请帮我解决这个关键问题
今天早上我收到了这个错误,我的剧本昨晚完美无缺。当我打开我的电脑,看到我的Firefox更新到47.0,当我开始我的脚本时,我收到此错误消息,上次当我得到类似问题更新selenium服务器与最新版本和我的脚本正常。但是这次我发现selenium服务器最新版本仍然是我上次更新的2.53.0 - 不知道应该更新什么。
我一直在使用Selenium服务器2.53.0当前的Firefox版本是47
注意:我将我的Firefox降级为46.0.1,但仍然存在同样的问题。
我可以使用Firefoxdriver.exe,如果是,请分享链接。
这是我的TestNG Trace更详细:
org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(C:\Program Files (x86)\Mozilla Firefox\firefox.exe) on port 7055; process output follows:
,"multiprocessCompatible":false,"signedState":0,"seen":true}
1465408689376 DeferredSave.extensions.json DEBUG Save changes
1465408689376 addons.xpi DEBUG Updating database with changes to installed add-ons
1465408689376 addons.xpi-utils DEBUG Updating add-on states
1465408689378 addons.xpi-utils DEBUG Writing add-ons list
1465408689380 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\e10srollout@mozilla.org.xpi
1465408689380 addons.xpi DEBUG Calling bootstrap method startup on e10srollout@mozilla.org version 1.0
1465408689380 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\firefox@getpocket.com.xpi
1465408689381 addons.xpi DEBUG Calling bootstrap method startup on firefox@getpocket.com version 1.0
1465408689381 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\loop@mozilla.org.xpi
1465408689382 addons.xpi DEBUG Calling bootstrap method startup on loop@mozilla.org version 1.2.6
1465408689397 addons.manager DEBUG Registering shutdown blocker for XPIProvider
1465408689398 addons.manager DEBUG Provider finished startup: XPIProvider
1465408689398 addons.manager DEBUG Starting provider: LightweightThemeManager
1465408689398 addons.manager DEBUG Registering shutdown blocker for LightweightThemeManager
1465408689398 addons.manager DEBUG Provider finished startup: LightweightThemeManager
1465408689398 addons.manager DEBUG Starting provider: GMPProvider
1465408689402 addons.manager DEBUG Registering shutdown blocker for GMPProvider
1465408689402 addons.manager DEBUG Provider finished startup: GMPProvider
1465408689402 addons.manager DEBUG Starting provider: PluginProvider
1465408689402 addons.manager DEBUG Registering shutdown blocker for PluginProvider
1465408689402 addons.manager DEBUG Provider finished startup: PluginProvider
1465408689403 addons.manager DEBUG Completed startup sequence
1465408689650 addons.manager DEBUG Starting provider: <unnamed-provider>
1465408689650 addons.manager DEBUG Registering shutdown blocker for <unnamed-provider>
1465408689650 addons.manager DEBUG Provider finished startup: <unnamed-provider>
1465408689652 DeferredSave.extensions.json DEBUG Starting write
1465408689823 addons.repository DEBUG No addons.json found.
1465408689824 DeferredSave.addons.json DEBUG Save changes
1465408689827 DeferredSave.addons.json DEBUG Starting timer
1465408689849 addons.manager DEBUG Starting provider: PreviousExperimentProvider
1465408689849 addons.manager DEBUG Registering shutdown blocker for PreviousExperimentProvider
1465408689849 addons.manager DEBUG Provider finished startup: PreviousExperimentProvider
1465408689852 DeferredSave.extensions.json DEBUG Write succeeded
1465408689853 addons.xpi-utils DEBUG XPI Database saved, setting schema version preference to 17
1465408689878 DeferredSave.addons.json DEBUG Starting write
1465408689887 DeferredSave.addons.json DEBUG Write succeeded
1465408698285 addons.xpi DEBUG Calling bootstrap method shutdown on e10srollout@mozilla.org version 1.0
1465408698286 addons.xpi DEBUG Calling bootstrap method shutdown on firefox@getpocket.com version 1.0
1465408698286 addons.xpi DEBUG Calling bootstrap method shutdown on loop@mozilla.org version 1.2.6
1465408698446 addons.manager DEBUG shutdown
1465408698447 addons.manager DEBUG Calling shutdown blocker for XPIProvider
1465408698447 addons.xpi DEBUG shutdown
1465408698447 addons.xpi-utils DEBUG shutdown
1465408698447 addons.manager DEBUG Calling shutdown blocker for LightweightThemeManager
1465408698448 addons.manager DEBUG Calling shutdown blocker for GMPProvider
1465408698449 addons.manager DEBUG Calling shutdown blocker for PluginProvider
1465408698449 addons.manager DEBUG Calling shutdown blocker for <unnamed-provider>
1465408698449 addons.manager DEBUG Calling shutdown blocker for PreviousExperimentProvider
1465408698451 addons.xpi DEBUG Notifying XPI shutdown observers
1465408698453 addons.manager DEBUG Async provider shutdown done
Build info: version: '2.49.1', revision: '7203e46', time: '2016-01-21 17:35:35'
System info: host: 'AGERA-LT26', ip: '10.100.20.218', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_71'
Driver info: driver.version: FirefoxDriver
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:134)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:271)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:119)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:218)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:211)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:207)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:120)
at watts.ParentModule.BaseInit.startUp(BaseInit.java:98)
at watts.CustomerManagement.test.testjobs(test.java:46)
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:86)
at org.testng.internal.Invoker.invokeMethod(Invoker.java:645)
at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:822)
at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1130)
at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
at org.testng.TestRunner.privateRun(TestRunner.java:782)
at org.testng.TestRunner.run(TestRunner.java:632)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:366)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:361)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:319)
at org.testng.SuiteRunner.run(SuiteRunner.java:268)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
at org.testng.TestNG.run(TestNG.java:1064)
at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:113)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:206)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:177)
Caused by: org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
,"multiprocessCompatible":false,"signedState":0,"seen":true}
1465408689376 DeferredSave.extensions.json DEBUG Save changes
1465408689376 addons.xpi DEBUG Updating database with changes to installed add-ons
1465408689376 addons.xpi-utils DEBUG Updating add-on states
1465408689378 addons.xpi-utils DEBUG Writing add-ons list
1465408689380 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\e10srollout@mozilla.org.xpi
1465408689380 addons.xpi DEBUG Calling bootstrap method startup on e10srollout@mozilla.org version 1.0
1465408689380 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\firefox@getpocket.com.xpi
1465408689381 addons.xpi DEBUG Calling bootstrap method startup on firefox@getpocket.com version 1.0
1465408689381 addons.xpi DEBUG Registering manifest for C:\Program Files (x86)\Mozilla Firefox\browser\features\loop@mozilla.org.xpi
1465408689382 addons.xpi DEBUG Calling bootstrap method startup on loop@mozilla.org version 1.2.6
1465408689397 addons.manager DEBUG Registering shutdown blocker for XPIProvider
1465408689398 addons.manager DEBUG Provider finished startup: XPIProvider
1465408689398 addons.manager DEBUG Starting provider: LightweightThemeManager
1465408689398 addons.manager DEBUG Registering shutdown blocker for LightweightThemeManager
1465408689398 addons.manager DEBUG Provider finished startup: LightweightThemeManager
1465408689398 addons.manager DEBUG Starting provider: GMPProvider
1465408689402 addons.manager DEBUG Registering shutdown blocker for GMPProvider
1465408689402 addons.manager DEBUG Provider finished startup: GMPProvider
1465408689402 addons.manager DEBUG Starting provider: PluginProvider
1465408689402 addons.manager DEBUG Registering shutdown blocker for PluginProvider
1465408689402 addons.manager DEBUG Provider finished startup: PluginProvider
1465408689403 addons.manager DEBUG Completed startup sequence
1465408689650 addons.manager DEBUG Starting provider: <unnamed-provider>
1465408689650 addons.manager DEBUG Registering shutdown blocker for <unnamed-provider>
1465408689650 addons.manager DEBUG Provider finished startup: <unnamed-provider>
1465408689652 DeferredSave.extensions.json DEBUG Starting write
1465408689823 addons.repository DEBUG No addons.json found.
1465408689824 DeferredSave.addons.json DEBUG Save changes
1465408689827 DeferredSave.addons.json DEBUG Starting timer
1465408689849 addons.manager DEBUG Starting provider: PreviousExperimentProvider
1465408689849 addons.manager DEBUG Registering shutdown blocker for PreviousExperimentProvider
1465408689849 addons.manager DEBUG Provider finished startup: PreviousExperimentProvider
1465408689852 DeferredSave.extensions.json DEBUG Write succeeded
1465408689853 addons.xpi-utils DEBUG XPI Database saved, setting schema version preference to 17
1465408689878 DeferredSave.addons.json DEBUG Starting write
1465408689887 DeferredSave.addons.json DEBUG Write succeeded
1465408698285 addons.xpi DEBUG Calling bootstrap method shutdown on e10srollout@mozilla.org version 1.0
1465408698286 addons.xpi DEBUG Calling bootstrap method shutdown on firefox@getpocket.com version 1.0
1465408698286 addons.xpi DEBUG Calling bootstrap method shutdown on loop@mozilla.org version 1.2.6
1465408698446 addons.manager DEBUG shutdown
1465408698447 addons.manager DEBUG Calling shutdown blocker for XPIProvider
1465408698447 addons.xpi DEBUG shutdown
1465408698447 addons.xpi-utils DEBUG shutdown
1465408698447 addons.manager DEBUG Calling shutdown blocker for LightweightThemeManager
1465408698448 addons.manager DEBUG Calling shutdown blocker for GMPProvider
1465408698449 addons.manager DEBUG Calling shutdown blocker for PluginProvider
1465408698449 addons.manager DEBUG Calling shutdown blocker for <unnamed-provider>
1465408698449 addons.manager DEBUG Calling shutdown blocker for PreviousExperimentProvider
1465408698451 addons.xpi DEBUG Notifying XPI shutdown observers
1465408698453 addons.manager DEBUG Async provider shutdown done
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:122)
... 32 more
答案 0 :(得分:0)
好消息。
我只是自己解决了这个问题。还在想..我做的是我卸载了Firefox并再次安装了46.0.0而且我从我的项目中删除了我的selenium jar。刷新了我的项目。显示错误所以再次添加相同的Jars并再次刷新,当我运行我的脚本时,我感到惊讶,因为它工作并打开firefox并进一步处理。