我正在尝试使用selenium网格运行自动化测试。我已将集线器和节点配置为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
答案 0 :(得分:0)
我知道如何解决这个问题。 实际上这是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"
现在它正在运作。