2014-09-19 69 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

相關問題