我得到以下異常,同時試圖使用Firefox 52在我的MAC通過運行硒2.46.0只是實例FirefoxDriverSelenium 2.46.0 org.openqa.selenium.firefox.NotConnectedException:無法在45000 ms後在端口7055上連接到主機127.0.0.1。
的新實例org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output:
features/[email protected]
1492032549324 addons.xpi DEBUG Loading bootstrap scope from /Applications/Firefox.app/Contents/Resources/browser/features/[email protected]
1492032549330 addons.xpi DEBUG Calling bootstrap method startup on [email protected] version 1.0
1492032549330 addons.xpi DEBUG Registering manifest for /Applications/Firefox.app/Contents/Resources/browser/features/[email protected]
1492032549330 addons.xpi DEBUG Loading bootstrap scope from /Applications/Firefox.app/Contents/Resources/browser/features/[email protected]
1492032549331 addons.xpi DEBUG Calling bootstrap method startup on [email protected] version 1.9
1492032549332 addons.xpi DEBUG Registering manifest for /Applications/Firefox.app/Contents/Resources/browser/features/[email protected]
1492032549333 addons.xpi DEBUG Loading bootstrap scope from /Applications/Firefox.app/Contents/Resources/browser/features/[email protected]
1492032549336 addons.xpi DEBUG Calling bootstrap method startup on [email protected] version 1.0.5
1492032549342 addons.xpi-utils DEBUG Starting async load of XPI database /var/folders/ww/gv287wh16h1dc2_vfkbqhzzsljzc90/T/anonymous2050536623730480419webdriver-profile/extensions.json
1492032549343 addons.xpi DEBUG Registering manifest for /Applications/Firefox.app/Contents/Resources/browser/features/[email protected]
1492032549343 addons.xpi DEBUG Loading bootstrap scope from /Applications/Firefox.app/Contents/Resources/browser/features/[email protected]
1492032549344 addons.xpi DEBUG Calling bootstrap method startup on [email protected] version 1.0
1492032549347 addons.manager DEBUG Registering shutdown blocker for XPIProvider
1492032549347 addons.manager DEBUG Provider finished startup: XPIProvider
1492032549347 addons.manager DEBUG Starting provider: LightweightThemeManager
1492032549347 addons.manager DEBUG Registering shutdown blocker for LightweightThemeManager
1492032549347 addons.manager DEBUG Provider finished startup: LightweightThemeManager
1492032549347 addons.manager DEBUG Starting provider: GMPProvider
1492032549355 addons.manager DEBUG Registering shutdown blocker for GMPProvider
1492032549356 addons.manager DEBUG Provider finished startup: GMPProvider
1492032549356 addons.manager DEBUG Starting provider: PluginProvider
1492032549356 addons.manager DEBUG Registering shutdown blocker for PluginProvider
1492032549356 addons.manager DEBUG Provider finished startup: PluginProvider
1492032549357 addons.manager DEBUG Completed startup sequence
1492032549818 addons.xpi-utils DEBUG Async JSON file read took 0 MS
1492032549818 addons.xpi-utils DEBUG Finished async read of XPI database, parsing...
1492032549822 addons.xpi-utils DEBUG Successfully read XPI database
1492032549843 addons.manager DEBUG Starting provider: <unnamed-provider>
1492032549843 addons.manager DEBUG Registering shutdown blocker for <unnamed-provider>
1492032549844 addons.manager DEBUG Provider finished startup: <unnamed-provider>
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
1492032549976 addons.manager DEBUG Starting provider: PreviousExperimentProvider
1492032549976 addons.manager DEBUG Registering shutdown blocker for PreviousExperimentProvider
1492032549977 addons.manager DEBUG Provider finished startup: PreviousExperimentProvider
2017-04-12 14:29:11.058 plugin-container[31127:15159940] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x933f, name = 'com.apple.tsm.portname'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2017-04-12 14:29:11.060 plugin-container[31127:15159940] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x4f17, name = 'com.apple.CFPasteboardClient'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2017-04-12 14:29:11.060 plugin-container[31127:15159940] void __CFPasteboardSetup() : Failed to allocate communication port for com.apple.CFPasteboardClient; this is likely due to sandbox restrictions
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:118)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:246)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:119)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:191)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:182)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:99)
at com.cobaltgroup.websites.kpi.BaseKPILeads$KpiWebDriverFactory.createLocalWebDriver(BaseKPILeads.java:156)
at com.cobaltgroup.websites.kpi.BaseKPILeads.setup(BaseKPILeads.java:91)
at com.cobaltgroup.websites.kpi.kia.KiaLeadSubmissionTest.setUp(KiaLeadSubmissionTest.java:57)
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:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at com.saucelabs.junit.ConcurrentParameterized$SauceClassRunnerForParameters.access$300(ConcurrentParameterized.java:170)
at com.saucelabs.junit.ConcurrentParameterized$SauceClassRunnerForParameters$2.run(ConcurrentParameterized.java:287)
at com.saucelabs.junit.ConcurrentParameterized$NonBlockingAsynchronousRunner$1.call(ConcurrentParameterized.java:312)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
org.openqa.selenium.WebDriverException: Failed to connect to binary FirefoxBinary(/Applications/Firefox.app/Contents/MacOS/firefox-bin) on port 7055; process output follows:
features/[email protected]
1492032549324 addons.xpi DEBUG Loading bootstrap scope from /Applications/Firefox.app/Contents/Resources/browser/features/[email protected]
1492032549330 addons.xpi DEBUG Calling bootstrap method startup on [email protected]g version 1.0
1492032549330 addons.xpi DEBUG Registering manifest for /Applications/Firefox.app/Contents/Resources/browser/features/[email protected]
1492032549330 addons.xpi DEBUG Loading bootstrap scope from /Applications/Firefox.app/Contents/Resources/browser/features/[email protected]
1492032549331 addons.xpi DEBUG Calling bootstrap method startup on [email protected] version 1.9
1492032549332 addons.xpi DEBUG Registering manifest for /Applications/Firefox.app/Contents/Resources/browser/features/[email protected]
1492032549333 addons.xpi DEBUG Loading bootstrap scope from /Applications/Firefox.app/Contents/Resources/browser/features/[email protected]
1492032549336 addons.xpi DEBUG Calling bootstrap method startup on [email protected] version 1.0.5
1492032549342 addons.xpi-utils DEBUG Starting async load of XPI database /var/folders/ww/gv287wh16h1dc2_vfkbqhzzsljzc90/T/anonymous2050536623730480419webdriver-profile/extensions.json
1492032549343 addons.xpi DEBUG Registering manifest for /Applications/Firefox.app/Contents/Resources/browser/features/[email protected]
1492032549343 addons.xpi DEBUG Loading bootstrap scope from /Applications/Firefox.app/Contents/Resources/browser/features/[email protected]
1492032549344 addons.xpi DEBUG Calling bootstrap method startup on [email protected] version 1.0
1492032549347 addons.manager DEBUG Registering shutdown blocker for XPIProvider
1492032549347 addons.manager DEBUG Provider finished startup: XPIProvider
1492032549347 addons.manager DEBUG Starting provider: LightweightThemeManager
1492032549347 addons.manager DEBUG Registering shutdown blocker for LightweightThemeManager
1492032549347 addons.manager DEBUG Provider finished startup: LightweightThemeManager
1492032549347 addons.manager DEBUG Starting provider: GMPProvider
1492032549355 addons.manager DEBUG Registering shutdown blocker for GMPProvider
1492032549356 addons.manager DEBUG Provider finished startup: GMPProvider
1492032549356 addons.manager DEBUG Starting provider: PluginProvider
1492032549356 addons.manager DEBUG Registering shutdown blocker for PluginProvider
1492032549356 addons.manager DEBUG Provider finished startup: PluginProvider
1492032549357 addons.manager DEBUG Completed startup sequence
1492032549818 addons.xpi-utils DEBUG Async JSON file read took 0 MS
1492032549818 addons.xpi-utils DEBUG Finished async read of XPI database, parsing...
1492032549822 addons.xpi-utils DEBUG Successfully read XPI database
1492032549843 addons.manager DEBUG Starting provider: <unnamed-provider>
1492032549843 addons.manager DEBUG Registering shutdown blocker for <unnamed-provider>
1492032549844 addons.manager DEBUG Provider finished startup: <unnamed-provider>
*** Blocklist::_loadBlocklistFromFile: blocklist is disabled
1492032549976 addons.manager DEBUG Starting provider: PreviousExperimentProvider
1492032549976 addons.manager DEBUG Registering shutdown blocker for PreviousExperimentProvider
1492032549977 addons.manager DEBUG Provider finished startup: PreviousExperimentProvider
2017-04-12 14:29:11.058 plugin-container[31127:15159940] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x933f, name = 'com.apple.tsm.portname'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2017-04-12 14:29:11.060 plugin-container[31127:15159940] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x4f17, name = 'com.apple.CFPasteboardClient'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2017-04-12 14:29:11.060 plugin-container[31127:15159940] void __CFPasteboardSetup() : Failed to allocate communication port for com.apple.CFPasteboardClient; this is likely due to sandbox restrictions
Build info: version: '2.49.1', revision: '808c23b0963853d375cbe54b90bbd052e2528a54', time: '2016-01-21 09:37:52'
System info: host: 'sea-meahm-m1.ds.ad.adp.com', ip: '127.0.0.1', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.11.6', java.version: '1.7.0_79'
Driver info: driver.version: FirefoxDriver
at org.openqa.selenium.firefox.internal.NewProfileExtensionConnection.start(NewProfileExtensionConnection.java:130)
at org.openqa.selenium.firefox.FirefoxDriver.startClient(FirefoxDriver.java:246)
at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:119)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:191)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:186)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:182)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:99)
at com.cobaltgroup.websites.kpi.BaseKPILeads$KpiWebDriverFactory.createLocalWebDriver(BaseKPILeads.java:156)
at com.cobaltgroup.websites.kpi.BaseKPILeads.setup(BaseKPILeads.java:91)
at com.cobaltgroup.websites.kpi.kia.KiaLeadSubmissionTest.setUp(KiaLeadSubmissionTest.java:57)
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:606)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:55)
at org.junit.rules.RunRules.evaluate(RunRules.java:20)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at com.saucelabs.junit.ConcurrentParameterized$SauceClassRunnerForParameters.access$300(ConcurrentParameterized.java:170)
at com.saucelabs.junit.ConcurrentParameterized$SauceClassRunnerForParameters$2.run(ConcurrentParameterized.java:287)
at com.saucelabs.junit.ConcurrentParameterized$NonBlockingAsynchronousRunner$1.call(ConcurrentParameterized.java:312)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
我發現建議降級我FF,有沒有更好的解決辦法比起那個來說?
只要確保你的geckodriver版本支持你的ff版本。如果你有最新的geckodriver,你可能是好的 – mrfreester
sn't genkodriver Selenium 3.x所需的,我使用Selenium 2.46.0 – Seagull
這將是你的問題然後,我會在一個更好的解釋回答:) – mrfreester