【问题标题】:codeception with selenium webDriver gives an error for systemProperty使用 selenium webDriver 的 codeception 给出了 systemProperty 的错误
【发布时间】:2017-03-10 10:53:12
【问题描述】:

我正在尝试在selenium webDriver 中使用codeception 运行测试。为了启动驱动程序,我使用这个命令

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...

但据我所知,我已经给出了驱动程序的路径,那么我该如何解决这个问题?

【问题讨论】:

    标签: php selenium selenium-webdriver webdriver codeception


    【解决方案1】:

    我和以前一样挣扎了几个小时。如果您使用的是 selenium 版本 2,您的命令是正确的。

    我已移至版本 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'
    

    【讨论】:

      猜你喜欢
      • 2017-05-18
      • 1970-01-01
      • 2014-07-24
      • 1970-01-01
      • 2015-04-30
      • 2019-10-22
      • 2017-09-29
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多