0

I am trying to Open IE using webDriver and getting following error:

Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones. Enable Protected Mode must be set to the same value

I have checked the Security Protected mode on for IE as suggested by other threads on the same matter. Also Zoom level is set to 100%

Still having the same issue.

Following is my code snippet:

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
public class Browser {

    public static WebDriver driver = null;

    public static void main(String[] args) {


        Driver("IE");
        driver.get("http://google.co.uk");
        driver.quit();


    }


    public static WebDriver Driver(String Driver_Type){

        if(Driver_Type.equalsIgnoreCase("FF")){
            driver = new FirefoxDriver();
        }
        else if(Driver_Type.equalsIgnoreCase("Chrome")){
            System.setProperty("webdriver.chrome.driver", "D:\\Selenium Stuff\\Browser drivers\\chromedriver.exe" );
            driver = new ChromeDriver();
        }
        else if(Driver_Type.equalsIgnoreCase("IE")){


            System.setProperty("webdriver.ie.driver", "D:\\Selenium Stuff\\Browser drivers\\IEDriverServer.exe");

            driver = new InternetExplorerDriver();

        }

        return driver;
    }

}

Could you kindly help me on this??

AHiggins
  • 7,029
  • 6
  • 36
  • 54
Dnyanesh
  • 41
  • 1
  • 3

2 Answers2

0

So after you change the protection setting and zoom level, it's still the same error popped out? or it becomes a different error? If you're using IE9, you may need to check this link eselenium-ieserverdriver-not-finding-new-windows-for-ie9 and it turns out enabling the compatibility mode solves the problem.

Community
  • 1
  • 1
Zhong Hu
  • 272
  • 2
  • 5
  • Thanks Praveen and Zhong, I did try after enabling and disabling the protection setting as mentioned, but the problem still persists.... – Dnyanesh Nov 25 '14 at 18:41
0

This is a very frequently asked question on the forum.

The solution is to disable the protected mode in the Internet explorer settings.

Steps to disable the protected mode:

Open Internet Explorer -> Settings -> Security Tab There you will find 4 categories (Internet, Local Intranet, Trusted Sites, Restricted Sites)

Click on one of them to find the "Check Box" Enable Protected Mode. Make sure the field is "Unchecked".

Make sure that Protected mode is all the zones.

This will solve your issue. More Details can be found on https://code.google.com/p/selenium/issues/detail?id=1795

Praveen
  • 1,387
  • 1
  • 12
  • 22