I have problem with start webdriver IE 11 in Selenium , Windows 10 version 20H2.
[ERROR] Tests run: 23, Failures: 3, Errors: 0, Skipped: 0, Time elapsed: 820.596 s <<< FAILURE! - in TestSuite
[ERROR] test.TestTrunkIE.firstTestIE Time elapsed: 0.07 s <<< FAILURE!
org.openqa.selenium.WebDriverException:
Failed to navigate to http://10.22.32.185:8090/login. This usually means that a call to the COM method IWebBrowser2::Navigate2() failed. The error returned is: Received error: 0x800700aa ['Żądane zasoby są w użyciu.']
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'APS00080705-MB', ip: '10.58.97.104', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_251'
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.edgechromium: false, ie.edgepath: , ie.ensureCleanSession: false, ie.fileUploadDialogTimeout: 3000, ie.forceCreateProcessApi: false, ignoreProtectedModeSettings: true, ignoreZoomSetting: true, initialBrowserUrl: http://localhost:48363/, nativeEvents: false, requireWindowFocus: false}, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: accept}
Session ID: 02ba92b2-7827-413c-9b02-16d3156abd23
at test.TestTrunkIE.firstTestIE(TestTrunkIE.java:51)
'The requested resource is in use.'
It's my code:
@BeforeTest
public void setUp() throws Exception {
System.setProperty("webdriver.ie.driver", "lib\\IE\\IEDriverServer.exe");
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability("nativeEvents", false);
caps.setCapability("unexpectedAlertBehaviour", "accept");
caps.setCapability("ignoreProtectedModeSettings", true);
caps.setCapability("disable-popup-blocking", true);
caps.setCapability("enablePersistentHover", true);
caps.setCapability("ignoreZoomSetting", true);
caps.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,true);
caps.setCapability("os", "Windows");
caps.setCapability("os_version", "10");
caps.setCapability("browser", "IE");
caps.setCapability("browser_version", "11.0");
caps.setCapability("resolution", "1920x1080");
caps.setCapability("browserstack.local", true);
caps.setCapability("browserstack.debug", true);
caps.setCapability("browserstack.networkLogs", true);
caps.setCapability("browserstack.selenium_version", "3.141.59");
caps.setCapability("INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS", true);
caps.setCapability("setJavascriptEnabled", true);
steps = new WebDriverSteps(new InternetExplorerDriver(caps));
}
'''
In Internet Exprorer I disable checkbox Enable Protected Mode ....
'''
[ERROR] Failures:
[ERROR] TestTrunkIE.firstTestIE:51 » WebDriver Failed to navigate to http://10.22.32.1...
[ERROR] TestTrunkIE.firstTestIE46:62 » WebDriver Failed to navigate to http://10.22.32...
[ERROR] TestTrunkIE.firstTestIE46Krus:74 » WebDriver Failed to navigate to http://10.2...
[INFO]
This error message...
...implies that the IEDriverServer was unable to initiate/spawn a new Browsing Context i.e. Internet Explorer Browser session as a COM object.
Protected Mode settings for Internet Explorer
JimEvans in his article mentioned, while automating internet-explorer through iedriverserver:
Further, the Required Configuration of Internet Explorer Driver clearly mentions:
IEDriverServerexectuable must be downloaded and placed in your PATH.Advancedtab of the Internet Options dialog.100%so that the native mouse events can be set to the correct coordinates.100%in display settings.HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE.HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE.FEATURE_BFCACHEsubkey may or may not be present, and should be created if it is not present. Inside this key, create aDWORDvalue namediexplore.exewith the value of 0`.Solution
First, you need to ensure that the Protected Mode settings for each zone to be the same value. Additionally you also need to ensure the Required Configuration for Internet Explorer Driver.
References
You can find a couple of relevant discussions in: