Cannot run protractor on Internet explorer 11

11,603

According to Connecting Directly to Browser Drivers directConnect setting would work for Firefox and Chrome only:

directConnect: true - Your test script communicates directly Chrome Driver or Firefox Driver, bypassing any Selenium Server. If this is true, settings for seleniumAddress and seleniumServerJar will be ignored. If you attempt to use a browser other than Chrome or Firefox an error will be thrown.

You need to remove/comment out directConnect:

exports.config = {
    multiCapabilities:[
        {
           'browserName': 'internet explorer'
        }
    ],
    ...
}

FYI, you can actually leave capabilities defined alongside with multiCapabilities, but in this case protractor would simply ignore capabilities and use multiCapabilities (docs).

Share:
11,603
user1613512
Author by

user1613512

Updated on June 04, 2022

Comments

  • user1613512
    user1613512 almost 2 years

    I'm trying to run my jasmine E2E tests on IE11 but with no luck or whatsoever. I'm on Windows 8.1. My config:

    exports.config = {
        directConnect: true,
    
        // Capabilities to be passed to the webdriver instance.
        capabilities: {
            'browserName': 'chrome'
        },
    
        // run in multiple browsers
        multiCapabilities:[
         //    {
         //        'browserName': 'chrome'
         //    },
            // {
         //        'browserName': 'firefox'
         //    },       
            {
               'browserName': 'internet explorer',
            }
        ],
    
        // Spec patterns are relative to the current working directly when
        // protractor is called.
        specs: ['./**/*js'],
    
        // Options to be passed to Jasmine-node.
        jasmineNodeOpts: {
            showColors: true,
            defaultTimeoutInterval: 30000
        },
    
        onPrepare: function () {
            // The require statement must be down here, since [email protected]
            // needs jasmine to be in the global and protractor does not guarantee
            // this until inside the onPrepare function.
            require('jasmine-reporters');
            jasmine.getEnv().addReporter(
                new jasmine.JUnitXmlReporter('xmloutput', true, true)
            );
        }
    };
    

    Chrome and Firefox work like a charm but IE gives me this:

    Error: browserName (internet explorer) is not supported with directConnect.
    

    IEDriverServer.exe is added to my path. I've did all the requred config: https://code.google.com/p/selenium/wiki/InternetExplorerDriver#Required_Configuration

    Any ideas?

  • Innovation
    Innovation about 9 years
    You can find more information on protractorsupport.blogspot.com/2015/05/…
  • R4444
    R4444 about 5 years
    You copied someone else's answer as is. Please add some more information to tell us why your answer is different.