java - Webdriver - Firefox 56(64 位)更新后超时不起作用

标签 java selenium firefox selenium-webdriver updates

我最近将我的 Firefox 浏览器更新至版本 56(64 位)。从这次更新中,我收到了网络驱动程序异常:超时。

早些时候,它工作得很好。我的 Selenium 版本是3.4

请参阅下面的错误跟踪。

com.myCompany.project1.init.Init.initWebDriverMethod(Init.java:125)。

该行的代码是

driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);

FAILED CONFIGURATION: @BeforeSuite initWebDriverMethod org.openqa.selenium.WebDriverException: timeouts Build info: version: '3.4.0', revision: 'unknown', time: 'unknown' System info: host: 'Machine1', ip: 'My_IP_Address', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_51' Driver info: org.openqa.selenium.firefox.FirefoxDriver Capabilities [{moz:profile=C:\Users\name\AppData\Local\Temp\rust_mozprofile.3BducR9iLAM9, rotatable=false, timeouts={implicit=0.0, pageLoad=300000.0, script=30000.0}, pageLoadStrategy=normal, moz:headless=false, platform=ANY, specificationLevel=0.0, moz:accessibilityChecks=false, acceptInsecureCerts=true, browserVersion=56.0, platformVersion=6.1, moz:processID=6108.0, browserName=firefox, javascriptEnabled=true, platformName=windows_nt}] Session ID: 817591e9-ceb0-4641-a567-0c85a4b32b7a at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.openqa.selenium.remote.http.W3CHttpResponseCodec.createException(W3CHttpResponseCodec.java:150) at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:115) at org.openqa.selenium.remote.http.W3CHttpResponseCodec.decode(W3CHttpResponseCodec.java:45) at org.openqa.selenium.remote.HttpCommandExecutor.execute(HttpCommandExecutor.java:164) at org.openqa.selenium.remote.service.DriverCommandExecutor.execute(DriverCommandExecutor.java:82) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:637) at org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions$RemoteTimeouts.implicitlyWait(RemoteWebDriver.java:868) at com.myCompany.project1.init.Init.initWebDriverMethod(Init.java:125) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:108) at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:523) at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:224) at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:146) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:326) at org.testng.SuiteRunner.run(SuiteRunner.java:289) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1301) at org.testng.TestNG.runSuitesLocally(TestNG.java:1226) at org.testng.TestNG.runSuites(TestNG.java:1144) at org.testng.TestNG.run(TestNG.java:1115) at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:132) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:230) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:76)

最佳答案

Sine Selenium 脚本使用 webdriver 将指令转换为浏览器可理解的格式,当您更新浏览器时,您还应该确保您使用的是最新的 webdriver 应用程序(或特定测试代码和浏览器)。

关于java - Webdriver - Firefox 56(64 位)更新后超时不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46645071/

相关文章:

css - HTML5 元素在 Chrome 中工作但在 Safari 或 Firefox 中不工作?

java - 无法使用 FireFox 浏览器启动 geckodriver - java.lang.NoClassDefFoundError : org/openqa/selenium/os/WindowsUtils

java - jInterop - 访问被拒绝 [0x00000005]

java - 将两个 BufferedImage 并排复制到一张图像中

java - 如何自动生成SQL语句而不触发Findbugs的SQL注入(inject)警告?

java - Selenium java静默模式

java - 我如何断言一个List恰好包含一个特定类的一个实例?

python - 如何在 XPath 中选择第二个 div 元素?

java - Selenium 使用 Css 在表中定位单元格

javascript - 单击浏览器操作时切换图标