Question

I got a simple problem when using InternetExplorerDriver:

 IWebDriver driver = new InternetExplorerDriver();
        //IWebDriver driver = new FirefoxDriver();
        // IWebDriver driver = new ChromeDriver();

         try
         {
             driver.Navigate().GoToUrl("http://myurl.pl/");
         }
         catch (Exception ex)
         {
             Console.WriteLine("ERROR: page load");
             Console.WriteLine(ex.ToString());
             System.Console.ReadLine();
             return;
         }

When I use the FireFox or Chrome, I always get the "ERROR: page load" exception (no such problems in FireFox). What happens, in fact, I do see the page loaded in opened browser, but WebDriver seems cannot communicate with browser later.

What is more, I do not get any message for the exception (except of my own and the next one in code - Unable to find element with name == email).

Do you have any hints on that? I need to use IE.

Was it helpful?

Solution

You haven't mentioned what version of IE you are using, but if you are using IE 7, 8, or 9 on Windows Vista or Windows 7, the problem communicating with IE using WebDriver is oftentimes due to Protected Mode settings. Starting with 2.0b1, you must set your IE Protected Mode settings to the same value for all zones. To set the Protected Mode settings, select Internet Options... from the Tools menu, and go to the Security tab in the Internet Options dialog. For each zone in the tab, you'll see a check box labeled "Enable Protected Mode". Set this check box to the same value for every zone. It can be checked or unchecked, as long as it is the same.

This page in the project wiki was recently updated to document this configuration requirement.

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