Unable to find element on closed window (WARNING: The server

时间:2022-02-24 07:35:09

当你的selenium WebDriver 启动IE11报这个错时:Unable to find element on closed window (WARNING: The server did not provide any stacktrace information),通过Google解决了:
Required Configuration:
For IE 11 only, you will need to set a registry entry on the target computer so that the driver can maintain a connection to the instance of Internet Explorer it creates. For 32-bit Windows installations, the key you must examine in the registry editor isHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE. For 64-bit Windows installations, the key isHKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE. Please note that the FEATURE_BFCACHE subkey may or may not be present, and should be created if it is not present. Important: Inside this key, create a DWORD value named iexplore.exe with the value of 0.

Unable to find element on closed window (WARNING: The server did not provide any stacktrace information)