Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ParameterException when starting selenium-server-standalone-3.0.0-beta2.jar via command line #2571

Closed
martinzehetmeier1078 opened this issue Aug 4, 2016 · 6 comments

Comments

@martinzehetmeier1078
Copy link

Meta -

OS: Windows 7
Selenium Version: selenium-server-standalone-3.0.0-beta2.jar

Expected Behavior -

I want to start my local standalone server as I did with previous versions with selenium-server-standalone (2.xx)
I did this via the command line
java -jar selenium-server-standalone-3.0.0-beta2.jar -Dwebdriver.chrome.driver=chromedriver.exe

Actual Behavior -

Exception in thread "main" com.beust.jcommander.ParameterException: Unknown option: -Dwebdriver.chrome.driver=chromedriver.exe at com.beust.jcommander.JCommander.parseValues(JCommander.java:742) at com.beust.jcommander.JCommander.parse(JCommander.java:282) at com.beust.jcommander.JCommander.parse(JCommander.java:265) at com.beust.jcommander.JCommander.<init>(JCommander.java:210) at org.openqa.grid.selenium.GridLauncherV3$1.setConfiguration(GridLauncherV3.java:202) at org.openqa.grid.selenium.GridLauncherV3.buildLauncher(GridLauncherV3.java:130) at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:67)

Steps to reproduce -

Start selenium-server-standalone with Parameter -Dwebdriver.chrome.driver

Is there any documentation on this how you start the standalone driver version 3 via command line and the parameters for the different drivers?

Thank you.

@johndharrison
Copy link

johndharrison commented Aug 4, 2016

The driver location needs to be passed to JVM:

  java [-options] -jar jarfile [args...]
            (to execute a jar file)

OS: Windows 10
Selenium Version: selenium-server-standalone-3.0.0-beta2.jar

I observe this on windows 10 and passing the geckodriver location also:

C:\Users\john\Documents>java -jar selenium-server-standalone-3.0.0-beta2.jar -Dwebdriver.gecko.driver=geckodriver.exe
Exception in thread "main" com.beust.jcommander.ParameterException: Unknown option: -Dwebdriver.gecko.driver=geckodriver.exe
at com.beust.jcommander.JCommander.parseValues(JCommander.java:742)
at com.beust.jcommander.JCommander.parse(JCommander.java:282)
at com.beust.jcommander.JCommander.parse(JCommander.java:265)
at com.beust.jcommander.JCommander.(JCommander.java:210)
at org.openqa.grid.selenium.GridLauncherV3$1.setConfiguration(GridLauncherV3.java:202)
at org.openqa.grid.selenium.GridLauncherV3.buildLauncher(GridLauncherV3.java:130)
at org.openqa.grid.selenium.GridLauncherV3.main(GridLauncherV3.java:67)

however reversing the argument orders results in running as expected:

java -jar -Dwebdriver.gecko.driver=geckodriver.exe selenium-server-standalone-3.0.0-beta2.jar
10:35:21.118 INFO - Selenium build info: version: '3.0.0-beta2', revision: '2aa21c1'
10:35:21.120 INFO - Launching a standalone Selenium Server
2016-08-04 10:35:21.136:INFO::main: Logging initialized @146ms
10:35:21.178 INFO - Driver class not found: com.opera.core.systems.OperaDriver
10:35:21.179 INFO - Driver provider com.opera.core.systems.OperaDriver is not registered
10:35:21.185 INFO - Driver provider org.openqa.selenium.safari.SafariDriver registration is skipped:
registration capabilities Capabilities [{browserName=safari, version=, platform=MAC}] does not match the current platform WIN10
2016-08-04 10:35:21.218:INFO:osjs.Server:main: jetty-9.2.15.v20160210
2016-08-04 10:35:21.235:INFO:osjsh.ContextHandler:main: Started o.s.j.s.ServletContextHandler@756e4d{/,null,AVAILABLE}
2016-08-04 10:35:21.252:INFO:osjs.ServerConnector:main: Started ServerConnector@12cc05a{HTTP/1.1}{0.0.0.0:4444}
2016-08-04 10:35:21.254:INFO:osjs.Server:main: Started @264ms
10:35:21.256 INFO - Selenium Server is up and running

@martinzehetmeier1078
Copy link
Author

Thank you, this worked also for me.

@lukeis lukeis closed this as completed Aug 4, 2016
@lukeis
Copy link
Member

lukeis commented Aug 4, 2016

reasoning also given on #2566

@jpruiz114
Copy link

Guess what????

"however reversing the argument orders results in running as expected"

It works!!!!

"c:\Program Files\Java\jdk1.8.0_121\bin\java" -Dwebdriver.chrome.driver=C:\Development\DMS\Projects\leadlava-automation\chromedriver.exe -jar selenium-server-standalone-3.3.1.jar

@smajazayeri
Copy link

smajazayeri commented Aug 11, 2017

When I run webdriver-manager start, it says Selenium Server is up and running in console, but the process keeps running. Should I kills the process and run my automation tests, or I have to leave it running and run the tests in a separate window?

image

taylormonacelli pushed a commit to taylormonacelli/selenium_node_setup_windows that referenced this issue Aug 30, 2017
taylormonacelli added a commit to taylormonacelli/selenium_node_setup_windows that referenced this issue Aug 30, 2017
@amrutjadhav
Copy link

Worked for me. Thanx. 😃

@lock lock bot locked and limited conversation to collaborators Aug 17, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants