2017-05-08 24 views
-1

最近我們升級了我們的Selenium C#綁定,v3.4,我們開始使用用於FF支持的Gecko驅動程序,所以我們使用v 0.16.1, We請注意,單擊該窗口打開新窗口(FF)後,WebDriverException處理程序超時,從以下位置彈出:driver.WindowHandles(Selenium command),GeckoDriver Selenium 3.4 - FF問題,WebDriverException處理程序超時

我們想知道這是常見問題還是您知道如何解決該問題?

初始化驅動程序代碼:

public void Setup() 
{ 
    var driverService = FirefoxDriverService.CreateDefaultService(); 
    driverService.FirefoxBinaryPath = @"C:\Program Files (x86)\Mozilla Firefox\firefox.exe"; 
    driverService.HideCommandPromptWindow = true; 
    driverService.SuppressInitialDiagnosticInformation = true; 
    m_driver = new FirefoxDriver(driverService, new FirefoxOptions(), TimeSpan.FromSeconds(60)); 
} 

回答

0

按照文檔here與您需要將您的硒版本一下子提高到3.4.0 geckodriver v0.16.0工作。所以它基本上意味着使用geckodriver v0.16.1 Selenium 3.4.0是強制性的。

Note that geckodriver v0.16.0 is only compatible with Selenium 3.4 and greater.

+0

對不起它是錯字的錯誤,我們正在使用3.4.0 – user1937902

+0

能否請您格式化您的代碼更好的視野?讓我們知道您正在使用的Selenium綁定,並更新問題中的錯誤堆棧跟蹤。謝謝 – DebanjanB

+0

'對於URL http:// localhost:56195/session/c2c37bf7-7001-41dc-8a5a-75b7f6b60233/window /句柄的遠程WebDriver服務器的HTTP請求在60秒後超時。 – user1937902