【发布时间】: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