如何运行 selenium-server-standalone? [英] how to run a selenium-server-standalone?
本文介绍了如何运行 selenium-server-standalone?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试运行 selenium 服务器,但出现错误:
I'm trying to run selenium server, and get errors:
rond-macpro:selenium eladb$ java -Dwebdriver.chrome.driver=./chromedriver -r selenium-server-standalone-2.44.0.jar
Unrecognized option: -r
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
没有 -r(它到底是什么?)
and without -r (what is it anyway?)
rond-macpro:selenium eladb$ java -Dwebdriver.chrome.driver=./chromedriver selenium-server-standalone-2.44.0.jar
Error: Could not find or load main class selenium-server-standalone-2.44.0.jar
我应该如何启动服务器?
how should I start the server?
如何设置非默认端口来监听?
how do I set a non-default port to listen to?
These two posts: 1 2 - contradicts regarding the syntax. I think.
推荐答案
java -jar seleniumjar.jar -Dwebdriver.chrome.driver=./chromedriver
如果你想指定端口做
java -jar seleniumjar.version.jar -Dwebdriver.chrome.driver=./chromedriver -port 4545
从 3.8.1 开始,不再需要指定驱动程序:
As of 3.8.1, specifying the driver is no longer necessary:
java -jar seleniumjar.jar
这篇关于如何运行 selenium-server-standalone?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文