我已经为我的Windows操作系统下载了selenium-standalone-server.jar和geckodriver.exe。
为了使用geckodriver启动服务器,我在Linux OS中看到了这个命令。
$ java -jar -Dwebdriver.gecko.driver=./geckodriver selenium-server-standalone-3.5.3.jar
我如何在Windows上执行此操作?
答案 0 :(得分:1)
使用它:
java -jar selenium-server-standalone-XX.XX.jar -port port_no
希望这对你有帮助!
答案 1 :(得分:1)
要启动 Selenium Server ,您不需要将 GeckoDriver 作为参数传递,并在默认配置中启动 Selenium Server 可以在 Windows OS 上使用以下命令行:
>java -jar selenium-server-standalone-3.11.0.jar
控制台输出:
C:\path\to>java -jar selenium-server-standalone-3.11.0.jar
16:05:41.383 INFO [GridLauncherV3.launch] - Selenium build info: version: '3.11.0', revision: 'e59cfb3'
16:05:41.384 INFO [GridLauncherV3$1.launch] - Launching a standalone Selenium Server on port 4444
2018-04-24 16:05:41.539:INFO::main: Logging initialized @523ms to org.seleniumhq.jetty9.util.log.StdErrLog
16:05:42.071 INFO [SeleniumServer.boot] - Welcome to Selenium for Workgroups....
16:05:42.071 INFO [SeleniumServer.boot] - Selenium Server is up and running on port 4444
答案 2 :(得分:0)
java -jar -Dwebdriver.gecko.driver=pathToGeckoDriver selenium-server-standalone-3.11.0.jar
Ex:pathToGeckoDriver = C:\ Users \ Selenium \ geckodriver.exe