Reprint to: http://www.cnblogs.com/LanTianYou/p/4811236.html
IE11 does not support Selenium 2.0, under what circumstances does not support it. For example, when you get an element on a page by Webdriver, you often catch an exception like this:
OpenQA.Selenium.NoSuchWindowException:Unable to find element on closed window
At OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError (Response errorresponse) in C:\Projects\webdriver\ Dotnet\src\webdriver\remote\remotewebdriver.cs:line 1139
Workaround:
For IE one-to-one, you'll need to set a registry entry on the target computer so, the driver can maintain a connection To the instance of Internet Explorer it creates. (This section tells you that you need to modify the registry.) )
For 32-bit Windows installations, the key you must examine in the Registry Editor is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft \internet Explorer\main\featurecontrol\feature_bfcache. (32bit windows look here.) )
For 64-bit Windows installations, the key is Hkey_local_machine\software\wow6432node\microsoft\internet Explorer\Main\ Featurecontrol\feature_bfcache. Please note that the Feature_bfcache subkey may or may isn't present, and should be created if it's not present. Important:inside This key, create a DWORD value named Iexplore.exe with the value of 0. (64bit windows look here.) )
Change your registry (run->regedit->enter), the path is as follows:
Hkey_local_machine\software\wow6432node\microsoft\internet Explorer\main\featurecontrol\feature_bfcache
If there is no feature_bfcache under the FeatureControl, the name of the new key is Feature_bfcache. and create a DWORD under it, named: Iexplore.exe,value is 0.
After you have finished modifying your registry, restart your computer. after running visual Studio (or Eclipse) with administrator privileges, open your project and run, and you will find that the problem is resolved. (Note: If you do not run as an administrator, it will still be an error.) )