【问题标题】:geb.driver.DriverCreationException: failed to create driver from callbackgeb.driver.DriverCreationException:无法从回调创建驱动程序
【发布时间】:2014-09-19 19:16:56
【问题描述】:

我正在设置一些 Geb 测试,但出现“geb.driver.DriverCreationException: failed to create driver from callback”错误。 Geb 将尝试启动测试浏览器窗口,但一旦启动,我的任何测试都不会运行,并且出现上述错误。

我刚刚对 Firefox 32.0.2 进行了自动 Firefox 更新,所以我怀疑新版本和 Selenium Web 驱动程序不再运行良好?我该如何解决?

这是我一直在使用的 Geb.config 文件吗?我已经 5 个月没换了,到现在都还好好的……

import org.openqa.selenium.firefox.FirefoxDriver
import geb.waiting.WaitingSupport


reportsDir = "target/geb-reports"
driver = { 
    //path is specific to each machine. This is the path to firefox.exe
    def pathToBin = 'C:\\Program Files (x86)\\Mozilla Firefox\\firefox.exe'
    System.setProperty("webdriver.firefox.bin",pathToBin)
    def driverInstance = new FirefoxDriver();
    driverInstance.manage().window().maximize()
    driverInstance
}

【问题讨论】:

    标签: java firefox selenium selenium-webdriver geb


    【解决方案1】:

    确实是我想的那样。将 jar 依赖项升级到 Selenium 2.43.1,它工作正常。之前用的是2.42.2

    【讨论】:

      猜你喜欢
      • 2011-09-02
      • 2011-05-12
      • 2018-05-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-11-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多