Parameter Exception - was passed main parameter but no main parameter was defined in your arg class while launching Selenium Grid Node
Asked Answered
C

3

8

Error:

Parameter Exception - was passed main parameter but no main parameter was defined in your arg class

Snapshot of the error:

Commandline output

Hub - 10.72.24.148:5555

I am running node using command line:

java -Dwebdriver.gecko.driver="C:\geckodriver.exe" -jar selenium-server-standalone-3.141.59.jar -role node -hub http://10.72.24.148:5555/grid/register -port 5566
Confrere answered 4/12, 2018 at 11:13 Comment(0)
H
3

The command to launch the Selenium Grid Node is error prone. You need to drop the double quotes i.e. "..." around C:\geckodriver.exe and replace the single back slash i.e. \ with escaped back slash i.e. \\ as follows:

java -Dwebdriver.gecko.driver=C:\\geckodriver.exe -jar selenium-server-standalone-3.141.59.jar -role node -hub http://10.72.24.148:5555/grid/register -port 5566
Haffner answered 4/12, 2018 at 11:26 Comment(5)
Hi, Could you please verify on what mistake am I making with this below command java -Dwebdriver.chrome.driver=C:\\chromedriver.exe -jar selenium-server-standalone-3.141.59.jar -role node -hub 10.130.106.33:4444/grid/register -port 5566Tailgate
When I run this command I see the following message Exception in thread "main" com.beust.jcommander.ParameterException: Was passed main parameter '-hub 10.130.106.33:4444/grid/register -port' but no main parameter was defined in y our arg class at com.beust.jcommander.JCommander.initMainParameterValue(JCommander.java:936)Tailgate
My colleague able to access my gird console using 10.130.106.33:4444/grid/console using a browser. Could you please help me in understanding on what am I making.Tailgate
@SrinivasanRamu Can you raise a new question with your new requirements please?Haffner
It would have been more helpful for me, if someobody has pointed out me that the "browser" name for Firefox was gecko, not firefox, here as well. I was fighting with -dWebdriver.firefox.driver= and not getting any visibility of the fault cause.Martens
M
1

Had the same error, above helps but also found in addition in Powershell, you have to use double quote, for example

java -"Dwebdriver.chrome.driver"=C:\Tools\chromedriver.exe  -jar .\selenium-server-standalone-3.141.59.jar

Above seems to work fine, note "Dwebdriver.chrome.driver"

Merow answered 9/4, 2019 at 1:13 Comment(0)
H
0

I got the same error and fixed with this

java -Dwebdriver.chrome.driver=chromedriver.exe -jar selenium-server-standalone-3.9.1.jar -role node -hub http://192.168.1.185:4444/grid/register -maxSession 100 -browser browserName=”chrome”,version=ANY,platform=WINDOWS,maxInstances=50 
Hiccup answered 21/9, 2023 at 9:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.