gpt4 book ai didi

java - Webdriver 在 45000 毫秒后无法连接到端口 7055 上的主机 127.0.0.1

转载 作者:搜寻专家 更新时间:2023-11-01 03:50:24 29 4
gpt4 key购买 nike

我收到以下错误。实际上,当我直接运行我的套件文件时它工作正常但是当我尝试运行 build.xml 时它显示错误。详细信息:Windows 7、64 位、FF 37.0.2、Selenium Server standalone-2.44


  org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
[testng] DeferredSave.extensions.json DEBUG Starting write
[testng] 1430823821029 addons.manager DEBUG shutdown
[testng] 1430823821030 addons.manager DEBUG Calling shutdown blocker for XPIProvider
[testng] 1430823821030 addons.xpi DEBUG shutdown
[testng] 1430823821030 addons.xpi-utils DEBUG shutdown
[testng] 1430823821030 addons.manager DEBUG Calling shutdown blocker for LightweightThemeManager
[testng] 1430823821031 addons.manager DEBUG Calling shutdown blocker for GMPProvider
[testng] 1430823821032 addons.manager DEBUG Calling shutdown blocker for PluginProvider
[testng] 1430823821422 DeferredSave.extensions.json DEBUG Write succeeded
[testng] 1430823821422 addons.xpi-utils DEBUG XPI Database saved, setting schema version preference to 16
[testng] 1430823821423 addons.xpi DEBUG Notifying XPI shutdown observers
[testng] 1430823821426 addons.manager DEBUG Async provider shutdown done
[testng] 1430823822007 addons.manager DEBUG Loaded provider scope for resource://gre/modules/addons/XPIProvider.jsm: ["XPIProvider"]
[testng] 1430823822009 addons.manager DEBUG Loaded provider scope for resource://gre/modules/LightweightThemeManager.jsm: ["LightweightThemeManager"]
[testng] 1430823822011 addons.xpi DEBUG startup
[testng] 1430823822012 addons.xpi INFO Mapping fxdriver@googlecode.com to C:\Users\lp305\AppData\Local\Temp\anonymous3559432167308222757webdriver-profile\extensions\fxdriver@googlecode.com
[testng] 1430823822012 addons.xpi DEBUG Ignoring file entry whose name is not a valid add-on ID: C:\Users\lp305\AppData\Local\Temp\anonymous3559432167308222757webdriver-profile\extensions\webdriver-staging
[testng] 1430823822013 addons.xpi INFO Mapping {972ce4c6-7e08-4474-a285-3208198ce6fd} to C:\Program Files (x86)\Mozilla Firefox\browser\extensions\{972ce4c6-7e08-4474-a285-3208198ce6fd}
[testng] 1430823822013 addons.xpi DEBUG Skipping unavailable install location app-system-share
[testng] 1430823822014 addons.xpi DEBUG Skipping unavailable install location app-system-local
[testng] 1430823822014 addons.xpi DEBUG checkForChanges
[testng] 1430823822015 addons.xpi DEBUG Loaded add-on state from prefs: {"app-profile":{"fxdriver@googlecode.com":{"d":"C:\\Users\\lp305\\AppData\\Local\\Temp\\anonymous3559432167308222757webdriver-profile\\extensions\\fxdriver@googlecode.com","e":true,"v":"2.44.0","st":1430823818166,"mt":1430823817961}},"app-global":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"C:\\Program Files (x86)\\Mozilla Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"37.0.2","st":1430726266335,"mt":1430726265855}}}
[testng] 1430823822016 addons.xpi DEBUG getModTime: Recursive scan of fxdriver@googlecode.com
[testng] 1430823822022 addons.xpi DEBUG getModTime: Recursive scan of {972ce4c6-7e08-4474-a285-3208198ce6fd}
[testng] 1430823822023 addons.xpi DEBUG getInstallState changed: false, state: {"app-profile":{"fxdriver@googlecode.com":{"d":"C:\\Users\\lp305\\AppData\\Local\\Temp\\anonymous3559432167308222757webdriver-profile\\extensions\\fxdriver@googlecode.com","e":true,"v":"2.44.0","st":1430823818166,"mt":1430823817961}},"app-global":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"d":"C:\\Program Files (x86)\\Mozilla Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}","e":true,"v":"37.0.2","st":1430726266335,"mt":1430726265855}}}
[testng] 1430823822024 addons.xpi DEBUG No changes found
[testng] 1430823822028 addons.manager DEBUG Registering shutdown blocker for XPIProvider
[testng] 1430823822028 addons.manager DEBUG Registering shutdown blocker for LightweightThemeManager
[testng] 1430823822030 addons.manager DEBUG Registering shutdown blocker for GMPProvider
[testng] 1430823822031 addons.manager DEBUG Registering shutdown blocker for PluginProvider
[testng] JavaScript error: file:///C:/Users/lp305/AppData/Local/Temp/anonymous3559432167308222757webdriver-profile/extensions/fxdriver@googlecode.com/components/driver-component.js, line 11487: TypeError: this.server_ is undefined
[testng] JavaScript error: chrome://fxdriver/content/server.js, line 38: NS_ERROR_XPC_CI_RETURNED_FAILURE: Component returned failure code: 0x80570015 (NS_ERROR_XPC_CI_RETURNED_FAILURE) [nsIJSCID.createInstance]
[testng] *** Blocklist::_preloadBlocklistFile: blocklist is disabled
[testng] 1430823823429 addons.manager DEBUG Registering shutdown blocker for <unnamed-provider>
[testng] at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:118)
[testng] at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:246)
[testng] at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:114)
[testng] at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:193)
[testng] at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186)
[testng] at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:182)
[testng] at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:95)
[testng] at lowLevel.GeneralMethods.getBrowser(GeneralMethods.java:86)
[testng] at highLevel.WebLogin.beforeClass(WebLogin.java:18)
[testng] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[testng] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
[testng] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
[testng] at java.lang.reflect.Method.invoke(Unknown Source)
[testng] at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
[testng] at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:564)
[testng] at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:213)
[testng] at org.testng.internal.Invoker.invokeMethod(Invoker.java:653)
[testng] at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
[testng] at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
[testng] at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
[testng] at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
[testng] at org.testng.TestRunner.privateRun(TestRunner.java:767)
[testng] at org.testng.TestRunner.run(TestRunner.java:617)
[testng] at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
[testng] at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
[testng] at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
[testng] at org.testng.SuiteRunner.run(SuiteRunner.java:240)
[testng] at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
[testng] at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
[testng] at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
[testng] at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
[testng] at org.testng.TestNG.run(TestNG.java:1057)
[testng] at org.testng.TestNG.privateMain(TestNG.java:1364)
[testng] at org.testng.TestNG.main(TestNG.java:1333)
[testng] ===============================================
[testng] testNG
[testng] Total tests run: 1, Failures: 0, Skips: 1
[testng] Configuration Failures: 1, Skips: 1
[testng] ===============================================
[testng] The tests failed.


BUILD SUCCESSFUL
Total time: 54 seconds

最佳答案

此问题是由于Selenium Server 和火狐浏览器

主要是在浏览器更新,现有的Selenium Server不支持新版本时显示。

解决方案是将Selenium服务器升级到最新版本。

引用:

https://code.google.com/p/selenium/issues/detail?id=6215

https://code.google.com/p/selenium/issues/detail?id=7810

https://code.google.com/p/selenium/issues/detail?id=7819

关于java - Webdriver 在 45000 毫秒后无法连接到端口 7055 上的主机 127.0.0.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30051643/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com