【问题标题】:GeckoDriver Selenium 3.4 - FF issue, WebDriverException handlers time outGeckoDriver Selenium 3.4 - FF 问题,WebDriverException 处理程序超时
【发布时间】:2017-05-08 11:59:16
【问题描述】:

最近我们升级了 Selenium C# 绑定,v3.4,我们开始使用 Gecko 驱动程序来支持 FF,所以我们使用的是 v 0.16.1, 我们注意到,在单击打开新窗口 (FF) 后,我们得到了 WebDriverException 处理程序超时,从以下位置弹出:driver.WindowHandles(Selenium 命令),

我们想知道这是否是常见问题,或者您是否知道如何解决该问题?

初始化驱动代码:

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));
}  

【问题讨论】:

    标签: selenium selenium-webdriver geckodriver


    【解决方案1】:

    根据文档here,要使用 geckodriver v0.16.0,您需要将 Selenium 版本升级到 3.4.0。所以它本质上意味着使用 geckodriver v0.16.1 Selenium 3.4.0 是强制性的。

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

    【讨论】:

    • 抱歉是拼写错误,我们使用的是 3.4.0
    • 您能否格式化您的代码以获得更好的视图?让我们知道您正在使用的 Selenium 绑定并更新问题中的错误堆栈跟踪。谢谢
    • '对远程 WebDriver 服务器的 URL localhost:56195/session/c2c37bf7-7001-41dc-8a5a-75b7f6b60233/… 的 HTTP 请求在 60 秒后超时。'
    • Selenium C# 绑定
    • 堆栈跟踪:'HttpCommandExecutor.cs:第 121 行在 OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute) 在 c:\Projects\webdriver\dotnet\src\webdriver\Remote\DriverServiceCommandExecutor。 c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebDriver.cs:OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters) 的第 84 行:OpenQA.Selenium 的第 1177 行。 c:\Projects\webdriver\dotnet\src\webdriver\Remote\RemoteWebDriver.cs'中的Remote.RemoteWebDriver.get_WindowHandles()
    猜你喜欢
    • 2021-10-05
    • 2021-12-01
    • 1970-01-01
    • 2017-03-12
    • 2017-05-24
    • 1970-01-01
    • 1970-01-01
    • 2013-06-05
    • 1970-01-01
    相关资源
    最近更新 更多