Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
776 views
in Technique[技术] by (71.8m points)

macos - Unknown option: -Dwebdriver.chrome.driver when running selenium server standalone on Mac

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:

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

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

"Unknown option: -Dwebdriver.chrome.driver"

any idea on why seleinum unable to recognize the options?

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

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

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

./node_modules/.bin/chromedriver --port=4444 --url-base=wd/hub  
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.

Example:

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

Also have Chrome browser installed.

Is drive instead of driver


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...