Manoj
Manoj

Reputation: 1

Protractor : Unexpected error launching Internet Explorer. Protected Mode settings are not the same for all zones

I am facing an issue while launching protractor.

Below is the code that I am using:

conf.js with below code

// An example configuration file. 
exports.config = {
// The address of a running selenium server. 
seleniumAddress: 'http://localhost:4444/wd/hub',
// Capabilities to be passed to the webdriver instance. 
capabilities: {
   // 'browserName': 'chrome'
    'browserName': 'internet explorer'
},

// Spec patterns are relative to the current working directly when 
// protractor is called. 
specs: ['example_spec.js'],

// Options to be passed to Jasmine-node. 
  allScriptsTimeout: 500000,
jasmineNodeOpts: {
    onComplete: null,
    isVerbose: true,
    showColors: true,
    includeStackTrace: true,
    defaultTimeoutInterval: 1000000
}
};

sample_class.js file with below code:

 describe('angularjs homepage title check', function () {
        it('should have a title', function () {
            console.log('Step 1');
            browser.get('http://google.com');
            expect(browser.getTitle()).toEqual('My Todolist Page');
        });

Below are the commands I used:

  1. Installed protractor and node js
  2. webdriver-manager update --ie
  3. webdriver-manager start

I'm looking for a working solution within Selenium, something like:

InternetExplorerOptions() { IntroduceInstabilityByIgnoringProtectedModeSettings = true} in selenium.

Thanks

Upvotes: 0

Views: 1223

Answers (1)

undetected Selenium
undetected Selenium

Reputation: 193088

Here is the Answer to your Question:

When you work with Selenium 3.4.0, IEDriverServer 3.4.0 with IE(v 10/11), you may consider configuring a couple of properties for IE to work as follows:

Along with setting,

InternetExplorerOptions() { IntroduceInstabilityByIgnoringProtectedModeSettings = true}

Consider the following:

  1. Protected Mode Settings: On IE 7 or higher on Windows Vista or Windows 7, you must set the Protected Mode settings for each zone to be the same value. The value can be on or off, as long as it is the same for every zone. To set the Protected Mode settings, choose "Internet Options..." from the Tools menu, and click on the Security tab. For each zone, there will be a check box at the bottom of the tab labeled "Enable Protected Mode".
  2. Zoom Level: Set Zoom Level to 100% for IE to work properly.
  3. Add the following InternetExplorerOptions():

    { ignoreProtectedModeSettings = true}
    { nativeEvents = true}
    { ignoreZoomSetting = true}
    { requireWindowFocus = true}
    { INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS = true}
    
  4. Incase of IE11: Additionally you have to consider the Registry Entries documented here.

Let me know if this Answers your Question.

Upvotes: 0

Related Questions