Reputation: 91
I'm getting an issue while trying to run Protractor on IE11 on a Windows Jenkins Slave Node.
When I connect by remote desktop, I'm able to run Protractor with no issues. However, when I try to run Protractor from Jenkins I run into this issue:
[launcher] Error: UnknownError: JavaScript error (WARNING: The server did not provide any stacktrace information)
Command duration or timeout: 396 milliseconds
Build info: version: '2.47.1', revision: '411b314', time: '2015-07-30 03:03:16'
System info: host: 'Win7', ip: '142.133.132.199', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_60'
Driver info: org.openqa.selenium.ie.InternetExplorerDriver
Capabilities [{browserAttachTimeout=0, enablePersistentHover=true, ie.forceCreateProcessApi=false, pageLoadStrategy=normal, ie.usePerProcessProxy=false, ignoreZoomSetting=false, handlesAlerts=true, version=11, platform=WINDOWS, nativeEvents=true, ie.ensureCleanSession=false, elementScrollBehavior=0, ie.browserCommandLineSwitches=, requireWindowFocus=false, browserName=internet explorer, initialBrowserUrl=http://localhost:12492/, takesScreenshot=true, javascriptEnabled=true, ignoreProtectedModeSettings=true, enableElementCacheCleanup=true, cssSelectorsEnabled=true, unexpectedAlertBehaviour=dismiss}]
Session ID: a43ccc90-f9f7-4465-98c3-dfb88751a5a9
at new bot.Error (C:\Jenkins\workspace\sandbox\node_modules\protractor\node_modules\selenium-webdriver\lib\atoms\error.js:108:18)
at Object.bot.response.checkResponse (C:\Jenkins\workspace\sandbox\node_modules\protractor\node_modules\selenium-webdriver\lib\atoms\response.js:109:9)
at C:\Jenkins\workspace\sandbox\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:379:20
at Array.forEach (native)
at goog.async.run.processWorkQueue (C:\Jenkins\workspace\sandbox\node_modules\protractor\node_modules\selenium-webdriver\lib\goog\async\run.js:130:15)
at process._tickCallback (node.js:356:9)
[launcher] Process exited with error code 100
This is weird, because I can run the same tests using any other browsers. Here are some things I tried:
Is there anything that I am missing?
Upvotes: 3
Views: 1073
Reputation: 216
I too had problems with Protractor tests under Jenkins, all worked well when I run the test in console, but not in Jenkins. Turned out, that IEDriverServer does not work, when Jenkins is running as a service (as is the default with jenkins window installer). For IE tests Jenkins MUST NOT RUN AS A SERVICE, instead Jenkins service must be closed and Jenkins started with
java -jar jenkins.war
(in jenkins directory) (see https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver)
Upvotes: 1
Reputation: 770
Make sure the versions of your node modules, specifically selenium, are the same on both the local machine and the remote machine.
Upvotes: 0
Reputation: 1333
I found out that reading documentation is a good thing :) https://code.google.com/p/selenium/wiki/InternetExplorerDriver
Read the configuring section
For IE 11 only, you will need to set a registry entry on the target computer so that the driver can maintain a connection to the instance of Internet Explorer it creates. For 32-bit Windows installations, the key you must examine in the registry editor is 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.
Worked for me...
Upvotes: 2