未知选项:在 Mac 上独立运行 selenium 服务器时 -Dwebdriver.chrome.driver [英] Unknown option: -Dwebdriver.chrome.driver when running selenium server standalone on Mac

查看:15
本文介绍了未知选项:在 Mac 上独立运行 selenium 服务器时 -Dwebdriver.chrome.driver的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I was trying to manually run selenium server standalone on MAC and then run my tests with intern-runner in Chrome browser. As I've been advised on intern User Guide:

要将 ChromeDriverIEDriver 与 Selenium 服务器一起使用,必须将驱动程序可执行文件放置在环境 PATH 中的某个位置,或者必须将它们的位置明确提供给Selenium 服务器在启动 Selenium 服务器时使用 -Dwebdriver.chrome.driver (ChromeDriver)-Dwebdriver.ie.driver (IEDriver) 标志."

"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 驱动程序的路径,但出现错误:

I started the Selenium server and put path to chrome driver on my machine, but got error:

"未知选项:-Dwebdriver.chrome.driver"

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

any idea on why seleinum unable to recognize the options?

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

Is there any other solution on how to run chrome webdriver/IE webDriver from command line with selenium standalone server?

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

Where the driver executable could be placed in the environment PATH on MAC?

我能够单独运行 chrome 驱动程序而没有任何问题:

I was able to run chrome driver separately with out any issues using:

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

推荐答案

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

For selenium3 you need to use Dwebdriver.chrome.driver option first.

java -Dwebdrive.chrome.driver=path_to_chrome_driver -jar selenium_server_file

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

To avoid any path issues better download both files in the same directory and run from there.

例子:

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

还安装了 Chrome 浏览器.

Also have Chrome browser installed.

是驱动而不是驱动

这篇关于未知选项:在 Mac 上独立运行 selenium 服务器时 -Dwebdriver.chrome.driver的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆