gpt4 book ai didi

java - geb.driver.DriverCreationException : failed to create driver from callback

转载 作者:行者123 更新时间:2023-11-30 09:02:32 26 4
gpt4 key购买 nike

我正在设置一些 Geb 测试,但出现“geb.driver.DriverCreationException:无法从回调创建驱动程序”错误。 Geb 将尝试启动测试浏览器窗口,但一旦启动,我的所有测试都不会运行,并且出现上述错误。

我刚刚将 Firefox 自动更新到 Firefox 32.0.2,所以我怀疑新版本和 Selenium Web Driver 不再正常运行了?我该如何解决?

这是我一直在使用的 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
}

最佳答案

果然和我想的一样。将 jar 依赖项升级到 Selenium 2.43.1,它工作正常。之前用的是2.42.2

关于java - geb.driver.DriverCreationException : failed to create driver from callback,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25940929/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com