Environment:
There are 2 problems here:
First, if you look at the default node config you will notice that only Firefox, Chrome and IE are enabled by default (that's why all you need to use them is specify driver location via a system property). If you want to use any other browser then you need to use your own json config:
{
"capabilities": [
{
"browserName": "MicrosoftEdge",
"platform": "WIN10",
"maxInstances": 1
},
{
"browserName": "firefox",
"platform": "WIN10",
"maxInstances": 5
},
{
"browserName": "chrome",
"platform": "WIN10",
"maxInstances": 5
},
{
"browserName": "internet explorer",
"platform": "WIN10",
"maxInstances": 1
}
],
"hub": "http://selenium-hub-host:4444"
}
and pass it to your command line:
java "-Dwebdriver.edge.driver=c:\path\to\MicrosoftWebDriver.exe" "-Dwebdriver.gecko.driver=c:\path\to\geckodriver.exe" "-Dwebdriver.chrome.driver=c:\path\to\chromedriver.exe" "-Dwebdriver.ie.driver=c:\path\to\IEDriverServer.exe" -jar "c:\path\to\selenium-server-standalone.jar" -role node -nodeConfig "c:\path\to\the\above.json"
(btw: alternatively you can also put the whole config in your command line using multiple -capabilities
or -browser
params)
This in theory should work. However in practice you will often be hit by the 2nd problem, which is: "sometimes it randomly doesn't work" ;] Initially everything will look fine: your grid will properly report Edge browser capability on the console, it will properly delegate tests to a node containing Edge, the node will properly start Edge browser, however the browser will sometimes freeze on its initial blue screen with e logo and after few seconds you will get some exception on the client side without any meaningful stack-trace nor message (I don't have it saved anywhere to paste here now).
Some people suggested a workaround to start 2 separate nodes on the same machine (on different ports of course) : one only for Edge and second for IE, FF and Chrome. This way it seems to work pretty stable (tested on Edge build 15063 running on win-10 and Selenium-3.4.0)
Additional info:
Apart from the above, Edge driver has few limitations that require specific workarounds in the configuration:
maxInstances
must be set to 1 (kudos to this answer)Try putting the -D parameters before the -jar parameter. I had an issue where it thought -Dwebdriver..... was a parameter to selenium itself instead of java.