2017-08-24 86 views
5

我有一個WebDriver基於Java測試套件,我試圖與詹金斯執行。 項目已導入並且構建成功。Firefox WebDriver:無法連接到二進制

在測試執行我獲得以下:

與運行的TestRunner 配置TestNG的:[email protected]c6dc org.openqa.selenium.firefox.NotConnectedException :無法在45000 ms後連接到端口7055上的主機127.0.0.1。 Firefox控制檯 輸出

它似乎沒有找到二進制文件,但它位於給定的路徑中。

失敗的測試:runBeforeTest(TestRunner的):無法連接到二進制 FirefoxBinary(/家/用戶1 /桌面/火狐/火狐斌)在端口7055; 過程輸出如下:(..)

在執行之前,我啓動了一個X服務器。

Xvfb :19 -screen 0 1024x768x16 & 
export DISPLAY=:19 
firefox & 

版本:

Ubuntu 16.04.3 
Selenium 2.53.1 
Firefox 55.0 
Jenkins 2.60.3 
+0

檢查Firefox/Selenium版本的兼容性。 –

+0

@LucianovanderVeekens:我怎麼能這樣做? – plaidshirt

回答

2

這很可能是硒和火狐之間的版本不匹配。

根據對其GitHub問題之一的評論,Selenium 2.53.1可以很好地與Firefox 47.0.1配合使用。

https://github.com/SeleniumHQ/selenium/issues/2527

爲了讓使用Firefox 55,則需要使用更高版本的硒(如果它已經支持)。

+0

我將Firefox更改爲47.0.1,並獲得與此JSON相同的錯誤:「Ubuntu修改」,「description」:「Pachetul Ubuntu Firefox」,「creator」:「Canonical Ltd。」,「homepageURL」:null} ...' – plaidshirt

相關問題