Reputation: 3331
I can't get protractor to work with IE 11 on Windows 10. It says Unable to create new service: InternetExplorerDriverService
and exists with code 199
I have tried the age old reinstalled/upgraded node, npm, protractor, webdriver-manager & java; and it didn't seem to make any difference.
Protractor works fine with Chrome; and having Chrome in the config does not affect IE.
My config file :
// protractor.conf.js
exports.config = {
framework: 'jasmine',
specs: [
'protractor/specs/**/*.js'
],
multiCapabilities: [
{
browserName: 'internet explorer',
version: 11,
'ignoreProtectedModeSettings': true
}
]
};
software versions :
node --version
v8.9.4
npm --version
5.7.1
protractor --version
Version 5.3.0
java -version
java version "1.8.0_161"
Java(TM) SE Runtime Environment (build 1.8.0_161-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.161-b12, mixed mode)
webdriver-manager status
[15:36:53] I/status - selenium standalone version available: 3.9.1 [last]
[15:36:53] I/status - chromedriver version available: 2.35 [last]
[15:36:53] I/status - geckodriver version available: v0.19.1 [last]
[15:36:53] I/status - IEDriverServer version available: 3.9.0 [last]
[15:36:53] I/status - android-sdk is not present
[15:36:53] I/status - appium is not present
Full Error
protractor ./tests/protractor.conf.js
(node:13724) [DEP0022] DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.
[15:37:44] I/launcher - Running 1 instances of WebDriver
[15:37:44] I/local - Starting selenium standalone server...
[15:37:53] I/local - Selenium standalone server started at http://10.1.0.213:52331/wd/hub
[15:37:53] E/launcher - Unable to create new service: InternetExplorerDriverService
Build info: version: '3.9.1', revision: '63f7b50', time: '2018-02-07T22:42:28.403Z'
System info: host: 'my.hostname', ip: '10.1.0.213', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_161'
Driver info: driver.version: unknown
[15:37:53] E/launcher - SessionNotCreatedError: Unable to create new service: InternetExplorerDriverService
Build info: version: '3.9.1', revision: '63f7b50', time: '2018-02-07T22:42:28.403Z'
System info: host: 'my.hostname', ip: '10.1.0.213', os.name: 'Windows 10', os.arch: 'amd64', os.version: '10.0', java.version: '1.8.0_161'
Driver info: driver.version: unknown
at Object.checkLegacyResponse (C:\Users\my.username\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\error.js:546:15)
at parseHttpResponse (C:\Users\my.username\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:509:13)
at doSend.then.response (C:\Users\my.username\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\http.js:441:30)
at <anonymous>
at process._tickCallback (internal/process/next_tick.js:188:7)
From: Task: WebDriver.createSession()
at Function.createSession (C:\Users\my.username\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver.js:769:24)
at createDriver (C:\Users\my.username\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\index.js:170:33)
at Builder.build (C:\Users\my.username\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\index.js:635:14)
at Local.getNewDriver (C:\Users\my.username\AppData\Roaming\npm\node_modules\protractor\built\driverProviders\driverProvider.js:53:33)
at Runner.createBrowser (C:\Users\my.username\AppData\Roaming\npm\node_modules\protractor\built\runner.js:195:43)
at q.then.then (C:\Users\my.username\AppData\Roaming\npm\node_modules\protractor\built\runner.js:339:29)
at _fulfilled (C:\Users\my.username\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:834:54)
at self.promiseDispatch.done (C:\Users\my.username\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:863:30)
at Promise.promise.promiseDispatch (C:\Users\my.username\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:796:13)
at C:\Users\my.username\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:604:44
[15:37:53] E/launcher - Process exited with error code 199
Running InternetExplorerDriverService manually opens a window which says
Started InternetExplorerDriver server (32-bit)
3.9.0.0
Listening on port 5555
Only local connections are allowed
But that doesn't change the outcome.
Upvotes: 2
Views: 5914
Reputation: 3331
The main thing that did it for me was renaming the downloaded file! npm/selenium downloaded C:\Users\my.username\AppData\Roaming\npm\node_modules\protractor\node_modules\webdriver-manager\selenium\IEDriverServer3.9.0.exe
out of desperation I removed the version, renaming it to IEDriverServer.exe
in the same folder; and that did the trick.
I also needed to get the security team to allow it to run, because of the nature of the environment for this project; this might not apply to everyone.
There are also a list of gotchas I found on the wiki; I didn't need to edit my registry (I don't have access to it anyway), so maybe leave that as a last resort.
Also from the Wiki https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE
. For 64-bit Windows installations, the key is HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE
. Please note that the FEATURE_BFCACHE
subkey may or may not be present, and should be created if it is not present. Important: Inside this key, create a DWORD
value named iexplore.exe with the value of 0.If you get an error saying
SessionNotCreatedError: 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 (enabled or disabled) for all zones.
Then you will need to open IE and make sure the the setting is the same for all zones, that is it can be on for all or off for all, but must be the same. Probably best to try it with it on for all to begin with to reduce the risk from bad actors unrelated to the original issues.
In an enterprise environment this might need admin access, and/or it might need doing after every sign in/reboot as it seems it can be set by policy (But that is out of scope of my knowledge).
Upvotes: 2