I do have this application that I wrote in selenium (java). When I deploy the test to my (windows 2008) remote server, it works fine. When I say fine, I can run the test and minimize the browser, even minimize the rdp and all my test would run complete and successful. Since I moved to Windows 2016, I have been experiencing lots of issues and none of my tests passes when I minimize the browser or rdp.

selenium: 3.11.0
IEDriverServer (32bits)
Browser - IE 11 (That is my company allowed browser)
Java 1.8

Here is the error message I do get.
Note: I did not use this selector in my application (css selector == *), I only used By.name("form_data[username]") and i'm sure the element is visible. I'm confused as to where it got the cssSelector.

Unable to find element with css selector == *[name='form_data[username]']
For documentation on this error, please visit: http://seleniumhq.org/exceptions/no_such_element.html
Build info: version: 'unknown', revision: 'unknown', time: 'unknown'
System info: host: 'SELENIUM-TEST', ip: '', os.name: 'Windows Server 2016', os.arch: 'x86', os.version: '10.0', java.version: '1.8.0_191'
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities {acceptInsecureCerts: false, browserName: internet explorer, browserVersion: 11, javascriptEnabled: true, pageLoadStrategy: normal, platform: WINDOWS, platformName: WINDOWS, proxy: Proxy(), se:ieOptions: {browserAttachTimeout: 0, elementScrollBehavior: 0, enablePersistentHover: false, ie.browserCommandLineSwitches: , ie.ensureCleanSession: false, ie.fileUploadDialogTimeout: 3000, ie.forceCreateProcessApi: false, ignoreProtectedModeSettings: true, ignoreZoomSetting: false, initialBrowserUrl: http://localhost:35190/, nativeEvents: true, requireWindowFocus: true}, setWindowRect: true, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: accept}
Session ID: 0046aa00-8401-49f6-bc73-734b9a36fdaf
*** Element info: {Using=name, value=form_data[username]}
  • So what would you like to achieve? And what is the question? When running maximized IE everything works fine? So run tests with maximized IE. Do you want to run it in headless mode? Then you should switch to FF/Chrome. Commented Jan 30, 2019 at 15:11
  • Thanks for your response. The test could not go pass that line because of this error message. It works on my windows 7. I maximized the browser and still the same issue. I'm not running in headless mode. The reason for minimizing the remote desktop is that when i connect to the remote server using my computer, i need to use the computer (screen) while running the test. This way, i have to minimize the remote desktop and go on with other things. When i minimize the remote desktop, my test fails.
    – DiD
    Commented Jan 30, 2019 at 16:14
  • Possibly the By.name function converts to a CSS selector. This is *[name='form_data[username]'] a selector to match any kind of element with a name form_data[username], exactly what you have in your code. Commented Jan 30, 2019 at 16:30

1 Answer 1


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.


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
    1. 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
    1. You will be kicked of the machine if it works

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.