grunt-protractor-runner
grunt-protractor-runner copied to clipboard
IE11 - Anyone able to run tests in Internet Explorer?
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?
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 u point to this selenium web driver server i.e., seleniumAddress: 'http://localhost:4444/wd/hub', *u can verify this URL from the cmd window where your selenium web driver server is running.
now u should be able to run your testcases against IE browser as well.
thanks, @hariszhr , this fixed the problem whereby webdriver manager couldn't find the IE driver. The next problems is protractor is extremely slow on IE11 64-bit. Is there a way to tell it to use the 32-bit driver?
Yes, thanks for the original solution, worked a charm after a restart (initially claimed port 4444 was in use but nothing showing up!).
I am too getting the incredibly slow speed (and I mean unbelievably slow!!) - did you manage to solve this ruslanss?
UPDATE: Manage to download the 32 Bit IEDriver manual and copy into the same install folder as other (overwrite). Then ran tests again, worked a charm! Thanks!
I think, Webdriver-manager by default puts ie driver here: C:\Users<User>\AppData\Roaming\npm\node_modules\protractor\selenium
Did u try to manually download the 32bit iedriver and put it here? That might work. Use the same name i.e., IEDriverServer.exe I dont use protractor anymore so i dont wanna try it out :)
Thanks for the response although managed to figure out through another search (see update in last).
Out of interest, what's your choice of tech now?
ok. great. I am using selenium driver in java now. I dont need any of features that protractor offers. And java project is easier to maintain and explain to other people :)
Cool, I had my suspicions you would be going to the 'source' as such, thanks!