gpt4 book ai didi

macos - 在 Mac 上独立运行 selenium 服务器时出现未知选项 : -Dwebdriver. chrome.driver

转载 作者:行者123 更新时间:2023-12-01 09:16:45 25 4
gpt4 key购买 nike

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

"To use ChromeDriver and IEDriver with a Selenium server, the driver executable must either be placed somewhere in the environment PATH, or their locations must be given explicitly to the Selenium server using the -Dwebdriver.chrome.driver (ChromeDriver) and -Dwebdriver.ie.driver (IEDriver) flags upon starting the Selenium server."



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

"Unknown option: -Dwebdriver.chrome.driver"

知道为什么 seleinum无法识别选项?

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

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

我能够单独运行 chrome 驱动程序,使用以下方法没有任何问题:
./node_modules/.bin/chromedriver --port=4444 --url-base=wd/hub  

最佳答案

对于 selenium3,您需要先使用 Dwebdriver.chrome.driver 选项。
java -Dwebdrive.chrome.driver=path_to_chrome_driver -jar selenium_server_file
为了避免任何路径问题,最好将两个文件下载到同一目录中并从那里运行。

例子:
java -Dwebdrive.chrome.driver=chromedriver -jar selenium-server-standalone-3.0.1.jar
还安装了 Chrome 浏览器。

Is drive instead of driver

关于macos - 在 Mac 上独立运行 selenium 服务器时出现未知选项 : -Dwebdriver. chrome.driver,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42032960/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com