7

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
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
pranky301
  • 315
  • 2
  • 4
  • 12

2 Answers2

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
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • 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 http://10.130.106.33:4444/grid/register -port 5566 – Srinivasan Ramu Feb 28 '19 at 21:02
  • 1
    When I run this command I see the following message Exception in thread "main" com.beust.jcommander.ParameterException: Was passed main parameter '-hub http://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) – Srinivasan Ramu Feb 28 '19 at 21:05
  • My colleague able to access my gird console using http://10.130.106.33:4444/grid/console using a browser. Could you please help me in understanding on what am I making. – Srinivasan Ramu Feb 28 '19 at 21:06
  • @SrinivasanRamu Can you raise a new question with your new requirements please? – undetected Selenium Mar 01 '19 at 05:45
  • 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. –  Oct 27 '20 at 15:41
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"

xelber
  • 4,197
  • 3
  • 25
  • 33