0
votes

I currently have a suite of tests which are run in Chrome using grunt-protractor-runner. I need to get the tests running on IE11 but having problems at the minute.

protractor.conf.js has this:

  capabilities: {
    'browserName': 'internet explorer',
    'platform': 'ANY',
    'version': '11'
  },

Gruntfile.js has this:

protractor: {
  options: {
    configFile: 'protractor.conf.js'
  },
  'internet explorer': {
    options: {
      args: {
        browser: 'internet explorer',
        version: '11'
      }
    }
  }
},

I have installed the IE Driver by running:

node C:\git\trove\node_modules\grunt-protractor-runner\node_modules\protractor\bin\webdriver-manager update --ie

And so I have IEDriverServer.exe in the folder with the other drivers (C:\git\trove\node_modules\grunt-protractor-runner\node_modules\protractor\selenium)

I get the below issue:

Running "express:dev" (express) task
Starting background Express server
debugger listening on port 5858
Express server listening on 9000, in test mode

Running "protractor:internet explorer" (protractor) task
Starting selenium standalone server...
[launcher] Running 1 instances of WebDriver
Selenium standalone server started at http://169.100.24.92:61862/wd/hub
ERROR - Unable to start a WebDriver session.

C:\git\trove\node_modules\grunt-protractor-runner\node_modules\protractor\node_modules\selenium-webdriver\lib\atoms\error.js:113
  var template = new Error(this.message);
                 ^
>>
Fatal error: protractor exited with code: 1

I'm not sure what to try - it doesn't give me any useful errors like those I've seen on other posts. I've tried specifying seleniumArgs in protractor.conf.js like so: seleniumArgs: ['-Dwebdriver.ie.driver=C:\git\trove\node_modules\grunt-protractor-runner\node_modules\protractor\selenium\IEDriverServer.exe'],

But this doesn't help either.

Can anyone please advise?

1

1 Answers

0
votes

Dont use the Protractor inside grunt-protractor-runner. install protractor globally i.e.,:

npm install -g protractor
webdriver-manager update
webdriver-manager update --ie

now start your selenium webdriver server inside cmd window:

webdriver-manager start

In your protractor conf.js file make sure you point to this selenium web driver server i.e.,

seleniumAddress: 'http://localhost:4444/wd/hub',

You can verify this URL from the cmd window where your selenium web driver server is running.

Now you should be able to run your testcases against IE browser as well.