2014-09-19 71 views
2

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

我刚刚做了Firefox 32.0.2的Firefox自动更新,所以我怀疑新版本和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 
} 

回答

2

这确实是我认为这是。将jar依赖升级到Selenium 2.43.1,它工作正常。在使用之前使用2.42.2

相关问题