2014-09-04 100 views
0

當我運行硒腳本時出現以下錯誤。無法從硒webdriver打開firefox

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms. Firefox console output: 
fTime":1409733904986}}},{"name":"winreg-app-user","addons":{"{e4f94d1e-2f53-401e-8885-681602c0ddd8}":{"descriptor":"C:\\ProgramData\\McAfee Security Scan\\Extensions\\{e4f94d1e-2f53-401e-8885-681602c0ddd8}.xpi","mtime":1396607774000}}},{"name":"app-profile","addons":{"[email protected]":{"descriptor":"C:\\Users\\kishna\\AppData\\Local\\Temp\\anonymous3395727590319882631webdriver-profile\\extensions\\[email protected]","mtime":1409812670363,"rdfTime":1409812670181}}}] 
1409812670931 addons.xpi-utils DEBUG Opening XPI database C:\Users\kishna\AppData\Local\Temp\anonymous3395727590319882631webdriver-profile\extensions.json 
1409812670931 addons.xpi DEBUG New add-on [email protected] installed in app-profile 
+2

什麼版本的Firefox?什麼版本的Selenium? – Arran 2014-09-04 07:01:56

+0

Firefox版本= 32.0和selenium-java-2.42.2 – 2014-09-04 07:06:49

+1

考慮到它是一兩天前發佈的Firefox版本,並且考慮到DevTools和DOM引擎的變化很少,我高度懷疑Selenium不支持這* *:https://developer.mozilla.org/en-US/Firefox/Releases/32 ...你需要給Selenium開發團隊時間來支持它 - 或者自己挖掘代碼並幫助他們弄清楚需要改變以支持這個版本。 – Arran 2014-09-04 07:09:39

回答

1

您使用selenium版本不支持Firefox版本32.

而且,由於目前存在着自稱爲Firefox 32的支持,你需要降級您的瀏覽器沒有selenium java包的版本。在你的情況下,降級到火狐,這是由硒2.42.2 listed as supported

也見類似的問題在這裏:

另見:

+0

我已將Firefox的32版本更改到31,它的工作。謝謝你alecxe和aran。 。 。 – 2014-09-05 13:38:09

+0

@krishnabeenavoina太棒了!不要忘記接受答案。謝謝! – alecxe 2014-09-05 13:38:37