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

14,797

Solution 1

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

Solution 2

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"

Share:
14,797
pranky301
Author by

pranky301

Updated on June 28, 2022

Comments

  • pranky301
    pranky301 almost 2 years

    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