Now Im using selenium version 4.8.1
With the following Code:
var ieOptions = new InternetExplorerOptions { };
ieOptions.AttachToEdgeChrome = true;
ieOptions.IntroduceInstabilityByIgnoringProtectedModeSettings= true;
WebDriver driver = new InternetExplorerDriver(ieOptions);
driver.Navigate().GoToUrl("https://bing.com");
driver.FindElement(By.Id("sb_form_q")).SendKeys("Hello world");
driver.FindElement(By.Id("sb_form")).Submit();
When I run the code, the program stops and timeouts after 60 seconds at the line
driver.Navigate().GoToUrl("https://bing.com");
I have consulted a few ways and I got it working when I turned off protected mode in internet options. Is there a way for me to not have to turn off protected mode in internet options and still be able to run normally?
Normally, you don't have to turn off protected mode if you have already specified
IntroduceInstabilityByIgnoringProtectedModeSettings = true. I failed to reproduce this issue with my IE Driver 4.8.1.0. It may have something to do with your IE Driver version (you've only said Selenium 4.8.1 but I'm not sure about your IE Driver version). You can try installing the latest version of IE Driver if you haven't.Update
I've found that it seems to be a common issue because it has also been reported elsewhere after you shared this issue. Changing registry settings of protected mode could be one of the solutions. Another possible solution is to directly navigate to the target URL without waiting for redirection from localhost. You can try the following option: