Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/233.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php selenium webDriver的codeception为systemProperty提供了一个错误_Php_Selenium_Selenium Webdriver_Webdriver_Codeception - Fatal编程技术网

Php selenium webDriver的codeception为systemProperty提供了一个错误

Php selenium webDriver的codeception为systemProperty提供了一个错误,php,selenium,selenium-webdriver,webdriver,codeception,Php,Selenium,Selenium Webdriver,Webdriver,Codeception,我正在尝试使用selenium webDriver中的codeception运行测试。对于启动驱动程序,我使用以下命令 java -jar -Dwebdriver.chrome.driver='path to chrome driver' selenium-server-standalone-3.2.0.jar 但是,当我开始运行测试时,会收到错误消息:驱动程序可执行文件的路径必须由webdriver.chrome.driver系统属性设置… 但据我所知,我已经给出了驱动程序的路径,那么我该如

我正在尝试使用
selenium webDriver
中的
codeception
运行测试。对于启动驱动程序,我使用以下命令

java -jar -Dwebdriver.chrome.driver='path to chrome driver' selenium-server-standalone-3.2.0.jar
但是,当我开始运行测试时,会收到错误消息:
驱动程序可执行文件的路径必须由webdriver.chrome.driver系统属性设置…


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

我已经花了几个小时来解决这个问题。如果您使用的是selenium版本2,则该命令为true

我已经转到第三版了。这不是很好的文档,但是现在必须在-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'