3

I have gone through the video deeply and tried it but I am struck, please help.

  • 1) I tried the code but i getting error of:

    org.openqa.selenium.SessionNotCreatedException: Unable to create new service: EdgeDriverService

Errors Image

So then later I found that there is a change to create a node for this error so i tried to create node by :

java -Dwebdriver.edge.driver=C:\MicrosoftWebDriver.exe -jar C:\selenium-server-standalone-3.8.1.jar -role node webdriver -hub  http://10.144.102.48:4444/grid/register -port 5566

and also:

java -Dwebdriver.edge.driver=C:\MicrosoftWebDriver.exe -jar C:\selenium-server-standalone-3.8.1.jar -role node webdriver -hub

Note: I am using a new VM with different IP address and I have downloaded MicrosoftWebDriver.exe and C:\selenium-server-standalone-3.8.1 in the fresh VM.

enter image description here

Blauharley
  • 4,186
  • 6
  • 28
  • 47
Dhrumil Pathak
  • 101
  • 3
  • 11
  • Please read why a [**`screenshot of HTML or code or error is a bad idea`**](https://meta.stackoverflow.com/questions/303812/discourage-screenshots-of-code-and-or-errors). Consider updating the Question with formatted text based HTML and code trials. – undetected Selenium Jan 04 '18 at 15:22
  • See this QA - https://stackoverflow.com/questions/48068189/error-while-running-selenium-remotedriver/48079731#48079731 – undetected Selenium Jan 04 '18 at 16:11

1 Answers1

1

The problem lies in your startup command for the node.

Valid values for role are either hub (To start the hub) (or) node (to start the JVM in the node mode) and no value which causes the JVM to come up in a standalone mode.

You provided

java -Dwebdriver.edge.driver=C:\MicrosoftWebDriver.exe -jar C:\selenium-server-standalone-3.8.1.jar -role node webdriver -hub http://10.144.102.48:4444/grid/register -port 5566

Please have this changed to

java -Dwebdriver.edge.driver=C:\MicrosoftWebDriver.exe -jar C:\selenium-server-standalone-3.8.1.jar -role node -hub http://10.144.102.48:4444/grid/register -port 5566

Notice that the role has been specified as just node and not as node webdriver (which you have provided)

On a side note, I would encourage you to have the MicrosoftWebDriver.exe binary available as part of your %PATH% variable. Its only a one time activity and so it wont need you to keep passing in the path to it via the JVM argument.

Krishnan Mahadevan
  • 14,121
  • 6
  • 34
  • 66