Selenium with Chromium Edge in IE Mode
In Selenium, when using latest IEDriverServer.exe (v 3.150.1.0) with C# to launch MS Edge in IE Mode, after clicking on a button I noticed that when we tried get driver.windowhandles.count it is returning always 0. Whereas the same code is working fine in Internet explorer 11 without any issues.
var ieService = InternetExplorerDriverService.CreateDefaultService(requiredDir, iedriverexe);
var ieOptions = new InternetExplorerOptions();
ieOptions.AddAdditionalCapability("ie.edgechromium", true);
ieOptions.AddAdditionalCapability("ie.edgepath", @"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe");
driver = new InternetExplorerDriver(ieService, ieOptions, TimeSpan.FromSeconds(30));
driver.Navigate().GoToUrl(APP_URL);
driver.FindElement(By.XPath("//input[@DIKey='txtUserName']")).SendKeys(strUsername);
driver.FindElement(By.XPath("//input[@DIKey='txtPassword']")).SendKeys(strPassword);
//Click on Login Button
driver.FindElement(By.Id("ic_C_C8")).Click();
WebDriverWait waitForIE = new WebDriverWait(driver, TimeSpan.FromSeconds(10));
waitForIE.Until((d) => d.WindowHandles.Count > 0);
int count = driver.WindowHandles.Count;
When we click on login button, current window is closed and another window is opened with home page but the count always returns '0'. driver variable is not retaining the window handles count.
I have unchecked "Enable protected mode" for all Zones. and also added "FEATURE_BFCACHE" in RegEdit as mentioned in "Required Configurations" in "https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver"
Please help