Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.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
Macos 未知选项:-Dwebdriver.chrome.driver在Mac上运行selenium server standalone时_Macos_Selenium_Selenium Chromedriver - Fatal编程技术网

Macos 未知选项:-Dwebdriver.chrome.driver在Mac上运行selenium server standalone时

Macos 未知选项:-Dwebdriver.chrome.driver在Mac上运行selenium server standalone时,macos,selenium,selenium-chromedriver,Macos,Selenium,Selenium Chromedriver,我试图在MAC上手动运行selenium server standalone,然后在Chrome浏览器中使用intern runner运行测试。正如《实习生用户指南》中所建议的那样: “若要在Selenium服务器上使用ChromeDriver和IEDriver,必须将驱动程序可执行文件放置在环境路径的某个位置,或者必须使用-Dwebdriver.chrome.driver(ChromeDriver)和-Dwebdriver.ie.driver(IEDriver)将其位置明确指定给Seleniu

我试图在MAC上手动运行selenium server standalone,然后在Chrome浏览器中使用intern runner运行测试。正如《实习生用户指南》中所建议的那样:

“若要在Selenium服务器上使用
ChromeDriver
IEDriver
,必须将驱动程序可执行文件放置在环境路径的某个位置,或者必须使用
-Dwebdriver.chrome.driver(ChromeDriver)
-Dwebdriver.ie.driver(IEDriver)将其位置明确指定给Selenium服务器。”
启动Selenium服务器时的标志。“

我启动了Selenium服务器并将chrome驱动程序的路径放在我的机器上,但出现错误:

知道为什么
seleinum
无法识别这些选项吗

关于如何使用selenium独立服务器从命令行运行
chrome webdriver/IE webdriver
,还有其他解决方案吗

驱动程序可执行文件可以放在MAC上的环境路径中的什么位置

我可以使用以下工具单独运行chrome驱动程序,而不会出现任何问题:

./node_modules/.bin/chromedriver --port=4444 --url-base=wd/hub  

对于selenium3,首先需要使用Dwebdriver.chrome.driver选项

java-Dwebdrive.chrome.driver=chrome\u驱动程序-jar selenium\u服务器\u文件的路径

为了避免任何路径问题,最好将两个文件下载到同一个目录中并从那里运行

例如:

java-Dwebdrive.chrome.driver=chromedriver-jar selenium-server-standalone-3.0.1.jar

还安装了Chrome浏览器

是司机而不是司机


谢谢你,劳达。Selenium服务器现在已启动并运行。如果
Dwebdrive
不起作用,请尝试使用
Dwebdriver