Configure Windows 10 and Edge for Selenium Grid

Background

I ran into an issue while using the Microsoft WebDriver (for Edge) where if there was no RDP session, then the tests would fail and throw an exception that Selenium couldn’t get the window handle after opening the browser. Official issue ticket logged here.

Solution

Credit goes to Olena F. from the same issue ticket linked above.

  1. RDP into your Grid Node
  2. Open cmd
  3. Type qwinsta and press [Enter]
  4. Get the ID of the current RDP process
  5. Create a .bat file with the following content: %windir%\system32\tscon.exe # /dest:console
    • Replace # with the ID from step 4
  6. On the desktop, create a shortcut to you .bat file
  7. Right-click on the shortcut and select “Properties”
  8. Select “Advanced…”
  9. Select “Run as administrator”
  10. Select “OK” to close the Advanced options window
  11. Select “OK” to close the Properties window
  12. Double-click the shortcut
    • You will be kicked of the machine if it works

Note: The script to start the node (covered in this post) will need to be ran while you have control of the RDP session.