我正在尝试使用codeception
中的selenium webDriver
进行测试。为了启动驱动程序,我使用此命令
java -jar -Dwebdriver.chrome.driver='path to chrome driver' selenium-server-standalone-3.2.0.jar
然而,当我开始运行测试时,我收到错误消息:the path to driver executable must be set by the webdriver.chrome.driver system property...
但据我所知,我已经给出了驱动程序的路径,所以我该如何解决这个问题呢?
答案 0 :(得分:0)
我之前和之前的这几个小时相比。如果您使用的是selenium版本2,则命令为true。
我已经转移到版本3.这不是很好记录,但现在必须在-jar参数之前传递Dwebdriver选项。
这会给你一些石灰:
java -Dwebdriver.chrome.driver=/your-dir/chromedriver -jar /your-dir/selenium-server-standalone-3.3.1.jar -port 4444'
或多个驱动程序:
java -Dwebdriver.chrome.driver=/your-dir/chromedriver -Dwebdriver.gecko.driver=/your-dir/geckodriver -jar /your-dir/selenium-server-standalone-3.3.1.jar -port 4444'