Question

I tried the code below a 100 times and still get this error:

Unexpected error launching Internet Explorer. Could not get document from window handle (NoSuchDriver)

Not much on this error except the Protected Zone sync which is worthless.

InternetExplorerOptions options = new InternetExplorerOptions();
options.IntroduceInstabilityByIgnoringProtectedModeSettings = true;
IWebDriver driver = new InternetExplorerDriver(
    pathContainingIEDriverServer, options);

driver.Navigate().GoToUrl("http://www.google.com");

IWebElement searchTermTB = driver.FindElement(By.Name("q"));
searchTermTB.SendKeys("jimmy collins blog");

IWebElement searchBtn = driver.FindElement(By.Name("btnG"));
searchBtn.Click();

driver.Close();
Was it helpful?

Solution

Turns out the webBrowser control in WinForms had every I need after all

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top