解決Selenium與firefox瀏覽器版本不兼容問題


因為在用java打開firefox瀏覽器的時候報錯

org.openqa.selenium.firefox.NotConnectedException: Unable to connect to host 127.0.0.1 on port 7055 after 45000 ms

在網上查閱了說是兼容問題

然后就開始找selenium版本與對應firefox版本匹配的記錄

各firefox版本下載地址

http://ftp.mozilla.org/pub/firefox/releases/

各selenium jar包下載地址

http://selenium-release.storage.googleapis.com/index.html

在selenium下載頁面 http://www.seleniumhq.org/download/ (需FQ) 各個版本的changelog中,會記錄支持的firefox版本,如下所示:

里面可以找到對應的記錄,仔細閱讀即可。

我挑選的第一個匹配

v2.53.1
======= Firefox: * Update to allow use with Firefox 47.0.1


selenium-server-standalone-2.53.1.jar
firefox47




免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM