如何运行selenium-server-standalone? [英] how to run a selenium-server-standalone?

查看:1142
本文介绍了如何运行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 do I set a non-default port to listen to?

这两个帖子: 1 2 - 与语法相矛盾。我想。

These two posts: 1 2 - contradicts regarding the syntax. I think.

推荐答案

java -jar seleniumjar.jar -Dwebdriver.chrome.driver=./chromedriver 

如果你想指定端口那么做

If you want to specifiy the port do

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屋!

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