簡體   English   中英

org.openqa.selenium.WebDriverException:必須通過webdriver.gecko.driver系統屬性設置驅動程序可執行文件的路徑;

[英]org.openqa.selenium.WebDriverException: The path to the driver executable must be set by the webdriver.gecko.driver system property;

我正在嘗試使用硒網格運行自動化測試。 我已將集線器和節點配置為java -jar :D\\selenium-server-standalone-3.4.0.jar -role hub.

 java -Dwebdriver.gecko.driver="D:\geckodriver.exe" -jar D:\selenium-server-standalone-3.4.0.jar -role node  -hub http://localhost:4444/grid/register -port 5566 -browser browserName=Firefox,maxInstances=5           

因為我的壁虎驅動程序和硒罐位於“ D”驅動器中。

但是,當我嘗試從Eclipse IDE運行測試時,會引發錯誤

org.openqa.selenium.WebDriverException: The path to the driver executable must be set by the webdriver.gecko.driver system property; for more information, see https://github.com/mozilla/geckodriver. The latest version can be downloaded from https://github.com/mozilla/geckodriver/releases
Command duration or timeout: 96 milliseconds  I am unable to identify  where It is going wrong??

我正在使用Firefox 47

我知道如何解決這個問題。 實際上,這是Firefox瀏覽器版本的問題。

Selenium 3.4.0與geckodriver 0.16 Firefox 52.0.3及更高版本配合使用效果最佳。

然后我將節點配置為

java -Dwebdriver.gecko.driver="D:\geckodriver.exe" -jar D:\selenium-server-standalone-3.4.0.jar -role node  -hub http://localhost:4444/grid/register -port 5566 -browser "browserName=Firefox,version=53.0,maxInstances=5"    

現在正在工作。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM