2014-09-25 91 views
-1

代碼中使用:org.openqa.selenium.firefox.NotConnectedException:無法在45000 ms後在端口7055上連接到主機127.0.0.1。 Firefox的控制檯輸出:

enter code here 
     ProfilesIni profile = new ProfilesIni(); 
     FirefoxProfile ffprofile = profile.getProfile("Other"); 
     WebDriver driver = new FirefoxDriver(ffprofile); 
     driver.get("http://google.com"); 

:運行源Firefox的網頁打開,但google.com不能打開錯誤

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output: 
reg-app-global","addons":{"[email protected]":{"descriptor":"C:\\Program Files (x86)\\Fiddler2\\FiddlerHook","mtime":1409222185915,"rdfTime":1406724252000}}},{"name":"app-global","addons":{"{972ce4c6-7e08-4474-a285-3208198ce6fd}":{"descriptor":"C:\\Program Files (x86)\\Mozilla Firefox\\browser\\extensions\\{972ce4c6-7e08-4474-a285-3208198ce6fd}","mtime":1411627483703,"rdfTime":1411627483531}}},{"name":"app-profile","addons":{"[email protected]":{"descriptor":"C:\\Users\\RT-13\\AppData\\Local\\Temp\\anonymous3444483664614526613webdriver-profile\\extensions\\[email protected]","mtime":1411630550698,"rdfTime":1411630550495}}}] 
1411630550942 addons.xpi-utils DEBUG Opening XPI database C:\Users\RT-13\AppData\Local\Temp\anonymous3444483664614526613enter code herewebdriver-profile\extensions.json 
1411630550943 addons.xpi DEBUG New add-on [email protected] installed in app-profile 
*** Blocklist::_loadBlocklistFromFile: block`enter code here`list is disabled 
1411630551091 addons.xpi-utils DEBUG Make addon app-profile:[email protected] visible 
1411630551094 DeferredSave.extensions.json DEBUG Save changes 
1411630551095 DeferredSave.extensions.json DEBUG Save changes 
1411630551095 addons.xpi DEBUG New add-on {972ce4c6-7e08-4474-a285-3208198ce6fd} installed in app-global 
1411630551098 addons.xpi-utils DEBUG Make addon app-global:{972ce4c6-7e08-4474-a285-3208198ce6fd} visible 
1411630551098 DeferredSave.extensions.json DEBUG Save changes 
1411630551098 DeferredSave.extensions.json DEBUG Save changes 
1411630551098 addons.xpi DEBUG New add-on [email protected] installed in winreg-app-global 
+1

的[webdriver的無法連接後45000毫秒到主機端口7055 127.0.0.1]可能的複製(http://stackoverflow.com/questions/12588082/webdriver-unable-to-connect -to-host-127-0-0-1-on-port-7055-after-45000-ms) – 2015-11-01 13:04:04

回答

2

請降級Firefox version到,並添加最新將selenium standalone server 2.43庫導入構建路徑。這是一個常見的問題,每個人的臉在一個星期:)

+0

降級後感謝firefox的工作 – sara444 2014-09-25 09:37:48

-1

解決方案至少一次 -

1)升級您的Selenium服務器即硒罐子「硒的服務器獨立,2.xx.x.JAR 「TO 」硒的服務器獨立-2.45.0.JAR「

2)升級您的硒客戶端驅動程序即硒libs文件夾 」硒-java的2.xx.x「 TO 」 硒Java的2.45.0「

3)檢查並安裝兼容版本的Firefox

這將解決你的問題..乾杯!

參考 - Download updated selenium libs & jar i.e. Version 2.45.0

+2

請不要在多個問題上發表相同的答案。如果它們是重複的,則使用您的標誌將它們標記爲重複項。如果他們不是重複的,那麼你需要調整你的答案,以確切的問題。我明白你目前不能將問題標記爲重複,但發佈重複答案不是要走的路。 – 2015-11-01 13:05:29

相關問題