Selenium: Using edge browser in Selenium grid

Created on 4 May 2016  Â·  29Comments  Â·  Source: SeleniumHQ/selenium

Meta -

OS:
OS X Yosemite
Selenium Version:
2.32.0, IDE: IntelliJ 14, etc
Browser:
Microsoft Edge
Browser Version:
20.10240.16384.0

Expected Behavior -

Start test on local Mac computer with selenium grid, grid calls the VM with a Windows 10 on it, and launches Edge browser and navigates to a website.

Actual Behavior -

Microsoft Edge browser launches but then there is an error.

Java code:

public class Grid {

    WebDriver driver;
    String baseUrl, nodeURL;

    @Before
    public void setUp() throws MalformedURLException {

        baseUrl= "http://google.com";
        nodeURL="http://testlab.rto.be:4444/wd/hub";
        DesiredCapabilities capability = DesiredCapabilities.edge();
        capability.setBrowserName("MicrosoftEdge");
       // capability.setBrowserName(BrowserType.EDGE);
        capability.setPlatform(Platform.WIN10);
        driver = new RemoteWebDriver(new URL(nodeURL),capability);
    }

    @Test
    public void simpleTest(){

        //driver.navigate().to("http://google.com");
        driver.get(baseUrl);
        Assert.assertEquals("Google", driver.getTitle());
    }

    @After
   public void afterTest(){
       driver.quit();
    }

}

code to lauch the node on the VM machine (Different attempts I have tried):

java -jar selenium-server-standalone-2.53.0.jar -role node  -hub http://testlab.rto.be:4444/grid/register  -browser browserName=firefox,firefox_binary="C:\Program Files (x86)\Mozilla Firefox\firefox.exe",maxInstances=5,platform=WINDOWS -browser browserName=chrome,webdriver.chrome.driver="C:\Selenium\chromedriver.exe",maxInstances=5,platform=WINDOWS -browser browserName="MicrosoftEdge",webdriver.edge.driver="C:\Selenium\MicrosoftWebDriver.exe,maxInstances=5,platform=WINDOWS


java -jar selenium-server-standalone-2.53.0.jar -role node  -hub http://testlab.rto.be:4444/grid/register -browser browserName="MicrosoftEdge",webdriver.edge.driver="C:\\Selenium\\MicrosoftWebDriver.exe",maxInstances=5,platform=WINDOWS

java -jar selenium-server-standalone-2.53.0.jar -role node  -hub http://testlab.rto.be:4444/grid/register -browser browserName="MicrosoftEdge",webdriver.edge.driver="C:\\Program Files (x86)\\Microsoft Web Driver\\MicrosoftWebDriver.exe",maxInstances=5,platform=WIN10

java -jar selenium-server-standalone-2.53.0.jar -role node  -hub http://testlab.rto.be:4444/grid/register -browser browserName="MicrosoftEdge",maxInstances=5,platform=WIN10

java -jar selenium-server-standalone-2.53.0.jar -role node  -hub http://testlab.rto.be:4444/grid/register -browser browserName="MicrosoftEdge",webdriver.edge.driver="C:/Program Files (x86)/Microsoft Web Driver/MicrosoftWebDriver.exe",maxInstances=5,platform=WIN10

Stacktrace:

org.openqa.selenium.WebDriverException: No such driver (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.92 seconds
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58'
System info: host: 'V10061', ip: '10.24.75.234', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_91'
Driver info: org.openqa.selenium.edge.EdgeDriver
Command duration or timeout: 2.78 seconds
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: 'mbpvanmacbook2.rto.be', ip: '10.1.16.201', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.10.5', java.version: '1.7.0_79'
Driver info: org.openqa.selenium.remote.RemoteWebDriver
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:158)
    at Grid.setUp(Grid.java:42)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:24)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: org.openqa.selenium.remote.SessionNotFoundException: No such driver (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 1.92 seconds
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 17:00:58'
System info: host: 'V10061', ip: '10.24.75.234', os.name: 'Windows 10', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_91'
Driver info: org.openqa.selenium.edge.EdgeDriver
Build info: version: '2.53.0', revision: '35ae25b1534ae328c771e0856c93e187490ca824', time: '2016-03-15 10:43:46'
System info: host: 'mbpvanmacbook2.rto.be', ip: '10.1.16.201', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.10.5', java.version: '1.7.0_79'
Driver info: driver.version: EdgeDriver
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206)
    at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158)
    at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678)
    at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
    at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:144)
    at org.openqa.selenium.edge.EdgeDriver.<init>(EdgeDriver.java:152)
    at org.openqa.selenium.edge.EdgeDriver.<init>(EdgeDriver.java:120)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:103)
    at org.openqa.selenium.remote.server.DefaultDriverProvider.newInstance(DefaultDriverProvider.java:97)
    at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:60)
    at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:222)
    at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:1)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)


java.lang.NullPointerException
    at Grid.afterTest(Grid.java:55)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)


java.lang.NullPointerException
    at Grid.afterTest(Grid.java:55)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
    at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
    at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:33)
    at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
    at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
    at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
    at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
    at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
    at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
    at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
    at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
    at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
    at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
    at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)


Process finished with exit code 255

C-grid D-edge

Most helpful comment

We have the same issue: If RDP session is connected Edge works fine. If RDP disconnected Edge doesn't work.
But IE works in both cases: With connected and disconnected RDP session.

When running Edge with disconnected RDP a Microsoft Web Driver Prozess remains in Memory for each failed session creation. After some time this eat's up a lot of System Ressources. For the moment we kill these processes with a scheduled tasks:
taskkill /F /IM MicrosoftWebDriver.exe /T
This keeps the other browsers working.

All 29 comments

Are you sure you're supposed to set the driver path in the -browser flag? Is that not just for the capability? I use -D for chromedriver like so: -Dwebdrivers.chrome.driver=chromedriver.exe so perhaps you should try -Dwebdriver.edge.driver="C:/Program Files (x86)/Microsoft Web Driver/MicrosoftWebDriver.exe" instead of setting it in the capability.

I was able to test using the following:

java -jar selenium-server-standalone-2.53.0.jar -port 5555 -role node -hub http://<host>:4444/grid/register -browser "browserName=MicrosoftEdge,platform=WINDOWS,maxInstances=10" -Dwebdriver.edge.driver=C:/Path/To/MicrosoftWebDriver.exe

I'm on 10.11.6 and the windows Machine is running Windows 10 Version 1607 Build 14393.105

I too have the same issue...Did this work for anyone ...I am using Windows 10 Enterprise edition...Latest stable Webdriver 2.53.1...Still no luck...
Thanks
Shankar KC

Hi there is there an ETA for this?
Thanks
Shankar KC

I am also facing this issue, below is the error log thrown

15:54:43.689 INFO [15] org.openqa.selenium.remote.server.DriverServlet - Executing: [new session: Capabilities [{css_selectors_enabled=true, browserName=MicrosoftEdge, javascriptEnabled=true, version=, platform=ANY, cssSelectorsEnabled=true}]]) 15:54:43.702 INFO [46] org.openqa.selenium.remote.server.DefaultDriverProvider - Creating a new session for Capabilities [{css_selectors_enabled=true, browserName=MicrosoftEdge, javascriptEnabled=true, version=, platform=ANY, cssSelectorsEnabled=true}] 15:54:44.965 WARN [15] org.openqa.selenium.remote.server.DriverServlet - Exception thrown java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03' System info: host: 'CPU1157', ip: '10.0.1.14', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_31' Driver info: driver.version: unknown at java.util.concurrent.FutureTask.report(Unknown Source) at java.util.concurrent.FutureTask.get(Unknown Source) at org.openqa.selenium.remote.server.DefaultSession.execute(DefaultSession.java:183) at org.openqa.selenium.remote.server.DefaultSession.<init>(DefaultSession.java:119) at org.openqa.selenium.remote.server.DefaultSession.createSession(DefaultSession.java:95) at org.openqa.selenium.remote.server.DefaultDriverSessions.newSession(DefaultDriverSessions.java:124) at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:59) at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:1) at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:111) at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:79) at org.openqa.selenium.remote.server.DriverServlet.handleRequest(DriverServlet.java:204) at org.openqa.selenium.remote.server.DriverServlet.doPost(DriverServlet.java:166) at javax.servlet.http.HttpServlet.service(HttpServlet.java:707) at org.openqa.selenium.remote.server.DriverServlet.service(DriverServlet.java:132) at javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at org.openqa.jetty.jetty.servlet.ServletHolder.handle(ServletHolder.java:428) at org.openqa.jetty.jetty.servlet.ServletHandler.dispatch(ServletHandler.java:680) at org.openqa.jetty.jetty.servlet.ServletHandler.handle(ServletHandler.java:571) at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1526) at org.openqa.jetty.http.HttpContext.handle(HttpContext.java:1479) at org.openqa.jetty.http.HttpServer.service(HttpServer.java:920) at org.openqa.jetty.http.HttpConnection.service(HttpConnection.java:820) at org.openqa.jetty.http.HttpConnection.handleNext(HttpConnection.java:986) at org.openqa.jetty.http.HttpConnection.handle(HttpConnection.java:837) at org.openqa.jetty.http.SocketListener.handleConnection(SocketListener.java:243) at org.openqa.jetty.util.ThreadedServer.handle(ThreadedServer.java:358) at org.openqa.jetty.util.ThreadPool$PoolThread.run(ThreadPool.java:537) Caused by: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03' System info: host: 'CPU1157', ip: '10.0.1.14', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_31' Driver info: driver.version: unknown at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:113) at org.openqa.selenium.remote.server.DefaultDriverProvider.newInstance(DefaultDriverProvider.java:97) at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:60) at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:222) at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:1) at java.util.concurrent.FutureTask.run(Unknown Source) at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.openqa.selenium.remote.server.DefaultDriverProvider.callConstructor(DefaultDriverProvider.java:103) ... 9 more Caused by: org.openqa.selenium.WebDriverException: Unknown error (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 590 milliseconds Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03' System info: host: 'CPU1157', ip: '10.0.1.14', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_31' Driver info: org.openqa.selenium.edge.EdgeDriver at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source) at java.lang.reflect.Constructor.newInstance(Unknown Source) at org.openqa.selenium.remote.ErrorHandler.createThrowable(ErrorHandler.java:206) at org.openqa.selenium.remote.ErrorHandler.throwIfResponseFailed(ErrorHandler.java:158) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:678) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:249) at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131) at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:144) at org.openqa.selenium.edge.EdgeDriver.<init>(EdgeDriver.java:152) at org.openqa.selenium.edge.EdgeDriver.<init>(EdgeDriver.java:120) ... 14 more 15:54:44.984 WARN [15] org.openqa.selenium.remote.server.DriverServlet - Exception: Unknown error (WARNING: The server did not provide any stacktrace information) Command duration or timeout: 590 milliseconds Build info: version: '2.53.1', revision: 'a36b8b1', time: '2016-06-30 17:37:03' System info: host: 'CPU1157', ip: '10.0.1.14', os.name: 'Windows 8.1', os.arch: 'amd64', os.version: '6.3', java.version: '1.8.0_31' Driver info: org.openqa.selenium.edge.EdgeDriver

org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException Build

I'm getting the same error. Haven't change anything since it was last working. Maybe EDGE got updated automatically.

I'm getting the following exception:

org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{proxy=org.openqa.selenium.Proxy@57b3fb03, browserVersion=, browserName=MicrosoftEdge, takesScreenshot=true version=, platform=ANY, unexpectedAlertBehaviour=ignore}], required capabilities = Capabilities [{}]
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'

I'm running the following:

  • Selenium v3.0.1, using Java bindings
  • Windows 10 Edge VM v14393.447
  • MicrosoftWebDriver.exe v14.14393

I've set the system property webdriver.edge.driver to point to the absolute path where the MicrosoftWebDriver.exe resides on the Windows 10 Edge VM.

In my code I'm doing:

DesiredCapabilities capabilities = DesiredCapabilities.edge();
RemoteWebDriver webdriver = new RemoteWebDriver(seleniumHubUrl, capabilities);

I see that ProtocolHandshake.createSession() is calling POST /session which results in an HTTP status-code of 500 (internal server error). I can see a MicrosoftWebDriver.exe process is started on the node and left running after the POST call. After seeing this, I made sure there were no orphaned MicrosoftWebDriver.exe processes running before attempting to create the session again. Same result - SessionNotCreatedException. I'm beginning to wonder if the MicrosoftWebDriver itself is failing to return a proper response?

I'm encountering the same exception as @schmidtkp. I'm using:

  • Selenium 3.0.1, C# bindings
  • Windows 10 Edge VM v14393.0
  • Microsoft Web Driver 3.14393 (targeting Windows 10 build 14393.0)

I'm starting the node using:

java -Dwebdriver.edge.driver=C:\Selenium\MicrosoftWebDriver.exe -Dwebdriver.chrome.driver=C:\Selenium\chromedriver.exe -jar C:\Selenium\selenium-server-standalone-3.0.1.jar -role webdriver -hub http://10.10.1.20:4444/grid/register -port 5566 -maxSession 5 -browser "browserName=MicrosoftEdge,platform=WINDOWS" -browser "browserName=chrome,platform=WINDOWS,maxInstances=5" -browser "browserName=firefox,platform=WINDOWS,maxInstances=5"

I'm calling Webdriver using:

caps = DesiredCapabilities.Edge();
WebDriver = new RemoteWebDriver(new System.Uri("http://ipaddress:4444/wd/hub"), caps);

The full log from the node is below:

NodeLog.txt

Watching the VM I can see Edge launch and quit several times, generating the Event Log entries shown below:

EventLogs.txt

These Event Log faults are only logged when launching Edge via Webdriver.

I am also facing similar issue
Selenium v3.0.1, Java binding
Windows 10 , build# 14393.693

//code snipet

    System.setProperty("webdriver.edge.driver", "C:/Program Files (x86)/Microsoft Web Driver/MicrosoftWebDriver.exe");
    DesiredCapabilities capability = DesiredCapabilities.edge();
    capability.setBrowserName("MicrosoftEdge");
    capability.setPlatform(Platform.WIN10);
    WebDriver driver = new EdgeDriver(capability);
    driver.get("http://www.google.com");

Browser is launching several times and them test fails with below exception

Jan 21, 2017 9:24:39 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Attempting bi-dialect session, assuming Postel's Law holds true on the remote end
Jan 21, 2017 9:24:40 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Falling back to original OSS JSON Wire Protocol.
Jan 21, 2017 9:24:42 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Falling back to straight W3C remote end connection
FAILED: EdgeBrowserTestUsingEdgeDriver
org.openqa.selenium.SessionNotCreatedException: Unable to create new remote session. desired capabilities = Capabilities [{browserName=MicrosoftEdge, version=, platform=WIN10}], required capabilities = Capabilities [{}]
Build info: version: '3.0.1', revision: '1969d75', time: '2016-10-18 09:49:13 -0700'
System info: host: 'Datta', ip: '192.168.x.xxx', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_112'

Do we have plans to fix this issue?

@shankarkc Can you clarify what is meant by "bug already taken care by the docker file we have"?

Ahh... My bad. Sorry for confusion. I replied to wrong mail thread. You need to use compatible version of edge browser and not latest. When i used compatible version of edge webdriver it worked for me. There is a mapping between os label and webdriver. If we have that mapping right it will work. At least it worked for us.

@shankarkc do you mind sharing your Selenium Version, Edge Version and Microsoft Driver Version? Thanks.

Edge driver details:-
Release 14393
Version: 3.14393
Windows 10 version details :-
Version 1607(OS Build 14393.321)
Edge browser details : -
Microsoft EdgeHTML 14.14393
Microsoft Edge 38.14393.0.0

Hope it helps

On Thu, Feb 16, 2017 at 6:30 AM, rolbemiranda notifications@github.com
wrote:

@shankarkc https://github.com/shankarkc do you mind sharing your
Selenium Version, Edge Version and Microsoft Driver Version? Thanks.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/SeleniumHQ/selenium/issues/2054#issuecomment-280194944,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEb7V68QZRZBroltMGzVrfwTInSOgR9Dks5rc5-1gaJpZM4IXHbz
.

@shankarkc With the Edge driver details you provided, are you calling:
WebDriver webdriver = new RemoteWebDriver(seleniumHubUrl, capabilities);
where your seleniumHubUrl is actually referencing a remote host (not localhost)?

Or are you calling:
WebDriver driver = new EdgeDriver(capability);

It seems people are getting the MicrosoftWebDriver to work in a Selenium Grid with a remote hosted hub, yet I filed this issue #10088793 with Microsoft and they confirmed it was a problem... Things that make me go "Hmmmmm...." :-)

I am using selenium grid 2.53.1 and not selenium 3.0 grid. Its because ff marionette is still not stable. Some APIs like sendkeys still dont work on selenium 3.0/marionette. Many of my tests do rely on that API. So I havnt tests this code with grid 3.0.... this is how start automation as i want to run my tests on grid than local machine. So call RemoteWebdriver constructor with desired capability that i need...I think below code clarifies details...

           WebDriver driver = null;
        DesiredCapabilities caps = prepareBrowserCapabilities();
        TestFarmParameter testParameter = GlobalBaseManager.getTestParameter();
                  String hubUrl = testParameter.getHubUrl();
            driver = new RemoteWebDriver(new URL(hubUrl), caps);
            logger.info( "HUB url:  " + hubUrl );
            driver.manage().window().maximize();

Here is the code that you might be interested in

private static DesiredCapabilities prepareBrowserCapabilities() {
        logger.debug("[Thread=" + Thread.currentThread().getId()
                + "] Starting to prepare browser Capabilities.");
        TestFarmParameter testParameter = GlobalBaseManager.getTestParameter();
        DesiredCapabilities caps = new DesiredCapabilities();
        caps.setCapability("nativeEvents", false);
        configureProxySettings(caps);

        caps.setCapability("jenkins.label", testParameter.getLabel());

        switch (testParameter.getPlatform().toUpperCase()) {
        case "WINDOWS":
            caps.setPlatform(org.openqa.selenium.Platform.WINDOWS);
            break;
         case "WIN10":
                caps.setPlatform(org.openqa.selenium.Platform.WIN10);
                break;
        case "VISTA":
            caps.setPlatform(org.openqa.selenium.Platform.VISTA);
            break;
        case "MAC":
            caps.setPlatform(org.openqa.selenium.Platform.MAC);
            break;
        case "ANDROID":
            caps.setPlatform(org.openqa.selenium.Platform.ANDROID);
            break;
        case "LINUX":
            caps.setPlatform(org.openqa.selenium.Platform.LINUX);
            break;
        default:
            // do nothing here
        }

        switch (testParameter.getBrowserType().toLowerCase()) {
        case "internet explorer":
            caps.setBrowserName(BrowserType.IE);
            caps.setCapability("ignoreProtectedModeSettings", true);
            caps.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
            caps.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,true);
            break;
        case "microsoftedge":
            caps.setBrowserName(BrowserType.EDGE); 
            caps.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
            caps.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,true);
            caps.setCapability(CapabilityType.SUPPORTS_JAVASCRIPT , true);  
            break;
        case "chrome":
            caps.setBrowserName(BrowserType.CHROME);
            caps.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
            break;
        case "firefox":
            caps.setBrowserName(BrowserType.FIREFOX);
            caps.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
            // we wont use marionette till it becomes stable
            // caps.setCapability("marionette", true);
            break;
        case "ipad":
            caps.setBrowserName(BrowserType.IPAD);
            break;
        case "android":
            caps.setBrowserName(BrowserType.ANDROID);
            break;
        default:
            throw new BrowserTypeNotSupportedException(
                    testParameter.getBrowserType(), WebDriverFactory.class,
                    new RuntimeException());
        }
        // Version
        if (testParameter.getBrowserVersion() != null
                && !testParameter.getBrowserVersion().isEmpty()) {
            caps.setVersion(testParameter.getBrowserVersion());
        }
        return caps;
    }

With this code and and edge driver/Windows10Version we are able to run tests on edge browser.

@shankarkc Ahhhh... "....using selenium grid 2.53.1 and not selenium 3.0 grid..." might have something to do with it. :-)

Grid version aside, what I specifically would like to know is the value of you hub URL:

String hubUrl = testParameter.getHubUrl();
driver = new RemoteWebDriver(new URL(hubUrl), caps);

Is it localhost:4444 or :4444?

@schmidtkp I'm one of those lucky people you referred to who is able to get Edge working remotely (i.e., a remote node via a remote hub). Using selenium 2.53.1 or 3.0.1. I wasn't able to get it to work unless I had an RDP session open to the node. _That is, web-driving Edge, like IE, won't work remotely unless it's running in an active GUI environment._ At least that's the only way I've got it to work.

So at first I simply opened a remote desktop connection to all the nodes running Edge. But that's a pain. So instead I have the node running a VNC server and make my test framework run a VNC client connected to the node VNC server before I start the tests.

Its remote host.... Like 10.xxxxxxx...our remote cloud machines.
On Feb 17, 2017 11:19 PM, "Kendall Schmidt" notifications@github.com
wrote:

@shankarkc https://github.com/shankarkc Ahhhh... "....using selenium
grid 2.53.1 and not selenium 3.0 grid..." might have something to do with
it. :-)

Grid version aside, what I specifically would like to know is the value of
you hub URL:

String hubUrl = testParameter.getHubUrl();
driver = new RemoteWebDriver(new URL(hubUrl), caps);

Is it localhost:4444 or :4444?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/SeleniumHQ/selenium/issues/2054#issuecomment-280719006,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AEb7V3Um1hVazlLAlLPJAfTS8R_cO-9Hks5rdd2RgaJpZM4IXHbz
.

We have the same issue: If RDP session is connected Edge works fine. If RDP disconnected Edge doesn't work.
But IE works in both cases: With connected and disconnected RDP session.

When running Edge with disconnected RDP a Microsoft Web Driver Prozess remains in Memory for each failed session creation. After some time this eat's up a lot of System Ressources. For the moment we kill these processes with a scheduled tasks:
taskkill /F /IM MicrosoftWebDriver.exe /T
This keeps the other browsers working.

I've managed to fully automate using Edge (build 15063) in a (remote) node of a selenium (v 3.4.0 and 3.5.0) grid: I enabled auto-login on a windows-10 virtual machine and added a batch script that starts the selenium node to auto-logged user's Startup Programs.
I've summarized all the important stuff to make it work here.

@morgwai Thank you for a great post! Apparently, this is more about configuration of Grid. Once properly set up, Grid can work with Edge correctly.

I'm going to close this issue. If there are any other problems with Grid + Edge, please raise a new one.

@morgwai Can you clarify for me the following?

  1. Is you Selenium Grid created locally - i.e. the Hub, Node(s), and test all run on a local host -or- is the grid distributed - i.e. the Hub, Nodes(s), and test all run on separate hosts (physical hosts, VM's or EC2 instances)?

  2. I assume you are calling RemoteWebDriver(URI(hub_host), DesiredCapabailities), correct?

I filed this MicrosoftWebDriver bug 12/2016, which MS has confirmed, yet there has been no activity/indication it has been resolved.

I've been running 2 distributed grids for several years running FF, CH, IE-8-11, all nodes properly configured, using auto-login/Start Menu, and maxInstance=1, etc. with no issues (per say). However, I have not had any luck using MicorsoftWebDriver/Edge in either of these 2 distributes grid environments. On the otherhand, I can get it to run if all is on my localhost.

@schmidtkp
Regarding the clarifications:

  1. distributed: everything on a separate host: java client program on my laptop (Linux Mint-18 64bit, Selenium-3.4.0), hub on a physical Linux server (Ubuntu-16.04.2 64bit, Selenium-3.4.0), and node on a Windows-10_Enterprise 64bit virtual machine with oracle java-8u144 and Selenium-3.4.0

  2. exactly as you wrote:

    public static void main(String[] args) throws MalformedURLException {
        URL hubUrl = new URL("http://diemvuong.2cs.local:4444/wd/hub");
        WebDriver driver = new RemoteWebDriver(hubUrl, DesiredCapabilities.edge());
        performTest(driver);
        driver.quit();
    }
    static void performTest(WebDriver driver) {
        driver.get("http://www.2clicksolutions.com/");
        WebElement name = driver.findElement(By.id("name"));
        name.sendKeys("Fidelio");
        // ...
    }

The only concern that comes to my mind is if you have tried to run Edge in a separate, dedicated node without any other browsers in it (as you haven't stated it). It is also possible that in the meantime some bug was silently fixed either in edge or its driver, or maybe even selenium...

@morgwai Thank you for the confirmation. Late Friday I was successful using the latest Edge webdriver (v15063) in AWS. Note: The node only registered the Edge browser with maxInstance=1. Today I'm going to add Chrome to the node registration to confirm your observation that having multiple browsers on the node causes problems.

Please note that having other browsers on the node does not guarantee a problem for 100%: it sometimes occurs, sometimes not and I wasn't able to identify any other deterministic reason for that so far. In my case Edge initially didn't want to work with other browsers on the same node and started to work like a charm after I removed them. The next day my config file was accidentally overwritten by a backup version with all other browsers included, but at that time it didn't prevent Edge from keep working :?

@morgwai I'm going to play it safe for now and isolate Edge on there own EC2 instances :-)

I have same issue when run on local machine which is Windows 10 Enterpise 64-bit (Microsoft Edge Version: 25.10586.672.0)and Microsoft WebDriver - Release 10240. My Selenium version is: 3.6.0

public class SeleniumTest {
    private WebDriver driver;
      @BeforeClass
    public void getWebDriver() {
        try {
            System.setProperty("webdriver.edge.driver", "myapp/driver/MicrosoftWebDriver.exe");
            DesiredCapabilities capabilities = DesiredCapabilities.edge();
            capabilities.setCapability(CapabilityType.ForSeleniumServer.ENSURING_CLEAN_SESSION, true);
            capabilities.setCapability(CapabilityType.PAGE_LOAD_STRATEGY, "eager");             
            capabilities.setPlatform(Platform.WIN10);
            capabilities.setBrowserName(BrowserType.EDGE);
            capabilities.setVersion("");
            driver = new EdgeDriver(capabilities);              
        } catch (Exception e) {
                e.printStackTrace();
        }

        driver.get(Constant.URL);
        driver.manage().window().maximize();
        driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);
    }

    @AfterClass
    public void quitDriver() throws InterruptedException {
        Thread.sleep(3000);
        driver.quit();
    }
       @Test ()
       public void aTest() {
       }
      @Test ()
      public void bTest() {
       }
}

When I run code it lunch the Edge Browser and has error:

org.openqa.selenium.NoSuchSessionException: null (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 873 milliseconds
Build info: version: '3.6.0', revision: '6fbf3ec767', time: '2017-09-27T15:28:36.4Z'
System info: host: 'computername', ip: 'myip', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_111'
Driver info: driver.version: EdgeDriver

@morgwai Thanks for sharing your guide, it has been helpfully. I post my issue in case of someone is blocked on the same point than me.

Running the Edge WebDriver at logon using the Group Policy in Windows 10 is not working. Anyway, the selenium grid, Chrome, Firefox and IE11 are working perfectly.

I've changed the edge script to the "Startup" folder and I've solved the issue.

Was this page helpful?
0 / 5 - 0 ratings