我正在尝试运行 selenium 服务器,但出现错误:
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(它到底是什么?)
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
我应该如何启动服务器?
如何设置非默认端口来监听?
最佳答案
java -jar seleniumjar.jar -Dwebdriver.chrome.driver=./chromedriver
如果你想指定端口做
java -jar seleniumjar.version.jar -Dwebdriver.chrome.driver=./chromedriver -port 4545
从 3.8.1 开始,不再需要指定驱动程序:
java -jar seleniumjar.jar
关于java - 如何运行 selenium-server-standalone?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28853634/