繁体   English   中英

硒RC“ driver.quit()”引发错误

[英]Selenium RC “driver.quit()” throwing error

我正在将selenium selenium-server-standalone-2.52.0.jar与最新的Firefox版本45配合使用,并遇到以下异常。 一切正常运行了一年以上。 Firefox 45什么问题

tearDown(selenium.tests.AppProfileTests)  Time elapsed: 18.317 sec  <<< FAILURE!
org.openqa.selenium.WebDriverException: Build info: version: '2.39.0', revision: '14fa800511cc5d66d426e08b0b2ab926c7ed7398', time: '2013-12-16 13:18:38'
System info: host: 'SKOTWAL', ip: '172.16.21.139', os.name: 'Windows 8', os.arch: 'amd64', os.version: '6.2', java.version: '1.7.0_09'
Session ID: d8d1af96-a1e9-446a-ab2d-e4520b5d4b62
Driver info: org.openqa.selenium.remote.RemoteWebDriver
Capabilities [{platform=WINDOWS, javascriptEnabled=true, acceptSslCerts=true, browserName=firefox, rotatable=false, locationContextEnabled=true, webdriver.remote.sessionid=d8d1af96-a1e9-446a-ab2d-e4520b5d4b62, version=44.0.2, cssSelectorsEnabled=true, databaseEnabled=true, handlesAlerts=true, nativeEvents=false, webStorageEnabled=true, applicationCacheEnabled=true, takesScreenshot=true}]
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
        at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:193)
        at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:145)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:569)
        at org.openqa.selenium.remote.RemoteWebDriver.quit(RemoteWebDriver.java:423)
        at selenium.SeleniumTestBase.tearDown(SeleniumTestBase.java:241)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
        at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
        at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
        at org.testng.internal.Invoker.invokeMethod(Invoker.java:786)
        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
        at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
        at org.testng.TestRunner.privateRun(TestRunner.java:767)
        at org.testng.TestRunner.run(TestRunner.java:617)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
        at org.testng.SuiteRunner.run(SuiteRunner.java:240)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
        at org.testng.TestNG.run(TestNG.java:1057)
        at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:293)
        at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:84)
        at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:91)
        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Caused by: org.openqa.selenium.remote.ScreenshotException: Screen shot has been taken
Build info: version: '2.39.0', revision: '14fa800511cc5d66d426e08b0b2ab926c7ed7398', time: '2013-12-16 13:18:38'
System info: host: 'SKOTWAL', ip: '172.16.21.139', os.name: 'Windows 8', os.arch: 'amd64', os.version: '6.2', java.version: '1.7.0_09'
Driver info: driver.version: RemoteWebDriver
        at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:125)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:554)
        at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:569)
        at org.openqa.selenium.remote.RemoteWebDriver.quit(RemoteWebDriver.java:423)
        at selenium.SeleniumTestBase.tearDown(SeleniumTestBase.java:241)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
        at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
        at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
        at org.testng.internal.Invoker.invokeMethod(Invoker.java:786)
        at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
        at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
        at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
        at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
        at org.testng.TestRunner.privateRun(TestRunner.java:767)
        at org.testng.TestRunner.run(TestRunner.java:617)
        at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
        at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
        at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
        at org.testng.SuiteRunner.run(SuiteRunner.java:240)
        at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
        at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
        at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
        at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
        at org.testng.TestNG.run(TestNG.java:1057)
        at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:293)
        at org.apache.maven.surefire.testng.TestNGXmlTestSuite.execute(TestNGXmlTestSuite.java:84)
        at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:91)
        at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
        at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
        at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
Caused by: java.lang.InterruptedException: null
        at java.lang.ProcessImpl.waitFor(ProcessImpl.java:451)
        at org.openqa.selenium.os.ProcessUtils$ProcessWaiter.run(ProcessUtils.java:164)
        at java.lang.Thread.run(Thread.java:745)

在堆栈跟踪的底部,您可以看到以下内容:

Caused by: java.lang.InterruptedException: null
        at java.lang.ProcessImpl.waitFor(ProcessImpl.java:451)

文档告诉您原因:

InterruptedException-如果当前线程在等待时被另一个线程中断,则等待结束,并抛出 InterruptedException。

我能想到的第一件事是TestNG(或您的其他机制)需要定时等待tearDown完成。

编辑:我刚刚看到,您正在将其与Firefox 45 (Beta版)一起使用。 稳定时间为44.0.2。 Selenium的浏览器支持声明它仅支持已经发布的版本。 至少对于我的英语。

因此,很可能您遇到了Selenium中尚未实现的更改。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM