question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using edge browser in Selenium grid

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:29 (2 by maintainers)

github_iconTop GitHub Comments

4reactions
ckumpecommented, Mar 6, 2017

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.

1reaction
morgwaicommented, Aug 20, 2017

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Run Selenium tests on Edge Browser using EdgeDriver?
Microsoft offers Microsoft WebDriver to execute the Selenium WebDriver automation tests on the Edge browser. Additionally, the driver allows the ...
Read more >
Setting up selenium grid to use Microsoft edge - Stack Overflow
There are 2 problems here: First, if you look at the default node config you will notice that only Firefox, Chrome and IE...
Read more >
How to Open Microsoft Edge Browser using Selenium in Java?
For invoking the chrome browser, we need the Eclipse IDE, Selenium Grid(version 4), and Edge Driver. Note: To open Chrome Browser Using ......
Read more >
Online Selenium Grid For MicrosoftEdge 16 - LambdaTest
With LambdaTest you get the advantage of cloud-based infrastructure, with the security and control behind your own firewall. Install ...
Read more >
M$ Edge in Selenium grid - Piotr Morgwai Kotarbiński
Edge driver sometimes does not play well with other browser drivers on the same node. Therefore if you followed all other points from...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found