NoSuchWindowException was unhandled : Unable to find element on closed window. IE 11 - Selenium C# NoSuchWindowException was unhandled : Unable to find element on closed window. IE 11 - Selenium C# selenium selenium

NoSuchWindowException was unhandled : Unable to find element on closed window. IE 11 - Selenium C#


Worked for me after running IEDriverServer as admin or setting protected mode for all zones (https://stackoverflow.com/a/21373224/217408)


Error:

org.openqa.selenium.NoSuchWindowException: Unable to find element on closed window (WARNING: The server did not provide any stacktrace information)

Step1. Change Windows registry.If you use Internet Explorer 11 x64 (64 bit),create file ie11_win64.reg has content:

Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BFCACHE]"iexplore.exe"=dword:00000000

Then run it.

If you use Internet Explorer 11 x86 (32 bit),create file ie11_win32.reg has content:

Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_BFCACHE]"iexplore.exe"=dword:00000000

Then run it.

Step2. Setting in internet explorer. Uncheck all (or Check all, must be the same for zones: Internet, Local intranet, Trusted sites, Restricted sites)

enter image description here

enter image description here

enter image description here

enter image description here