I have seen couple of other threads dealing with similar issue but not same. I am using direct connect to the browser and ChromeDriver
occasionally fails to start with the following error. Looks like I can set some browser timeout in config file just cannot figure it out. the conf.js
looks like
'use strict';
exports.config = {
/* seleniumAddress: 'http://127.0.0.1:4444/wd/hub',
** enables to connect to the browsers directly.
** http://stackoverflow.com/questions/27889488/cannot-run-protractor-on-internet-explorer-11
*/
directConnect: true,
specs: ['giftengHomePageTests.js'],
multiCapabilities: [{
'browserName': 'chrome'
}, {
'browserName': 'firefox'
},
/**
* {
* 'browserName': 'internet explorer'
* }
* */
],
jasmineNodeOpts: {
showColors: true,
defaultTimeoutInterval: 30000,
isVerbose: true
},
onPrepare: function () {
browser.driver.manage().window().maximize();
}
}
[chrome #1] Using ChromeDriver directly...
[chrome #1] ERROR - Unable to start a WebDriver session.
[chrome #1] Error: listen EACCES
Error Update
I have ran these same tests multiple times and now got the failure on Firefox driver. It's very irregular
"D:\Program Files (x86)\JetBrains\WebStorm 9.0.3\bin\runnerw.exe" "D:\Program Files\nodejs\node.exe" d:\Users\Saifur\AppData\Roaming\npm\node_modules\protractor\lib\cli.js specs\smoke\conf.js [launcher] Running 2 instances of WebDriver
[firefox #2] PID: 5748 [firefox #2] Specs: e:\working\protractor-e2e\specs\smoke\giftengHomePageTests.js [firefox #2] [firefox #2] Using FirefoxDriver directly... [firefox #2] ERROR - Unable to start a WebDriver session. [firefox #2] Error: listen EACCES [firefox #2] at exports._errnoException (util.js:746:11) [firefox #2] at Server._listen2 (net.js:1112:19) [firefox #2] at listen (net.js:1155:10) [firefox #2] at Server.listen (net.js:1240:5) [firefox #2] at isFree (d:\Users\Saifur\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\net\portprober.js:165:10) [firefox #2] at findPort (d:\Users\Saifur\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\net\portprober.js:197:7) [firefox #2] at d:\Users\Saifur\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\net\portprober.js:186:5 [firefox #2] at [object Object].promise.ControlFlow.runInFrame_ (d:\Users\Saifur\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:1877:20) [firefox #2] at [object Object].promise.Callback_.goog.defineClass.notify (d:\Users\Saifur\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:2464:25) [firefox #2] at [object Object].promise.Promise.notify_ (d:\Users\Saifur\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\promise.js:563:12) [firefox #2] From: Task: WebDriver.createSession() [firefox #2] at Function.webdriver.WebDriver.acquireSession_ (d:\Users\Saifur\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:155:22) [firefox #2] at Function.webdriver.WebDriver.createSession (d:\Users\Saifur\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\lib\webdriver\webdriver.js:129:30) [firefox #2] at new Driver (d:\Users\Saifur\AppData\Roaming\npm\node_modules\protractor\node_modules\selenium-webdriver\firefox\index.js:272:36) [firefox #2] at [object Object].DirectDriverProvider.getNewDriver (d:\Users\Saifur\AppData\Roaming\npm\node_modules\protractor\lib\driverProviders\direct.js:75:16) [firefox #2] at [object Object].Runner.createBrowser (d:\Users\Saifur\AppData\Roaming\npm\node_modules\protractor\lib\runner.js:180:37) [firefox #2] at d:\Users\Saifur\AppData\Roaming\npm\node_modules\protractor\lib\runner.js:257:21 [firefox #2] at _fulfilled (d:\Users\Saifur\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:797:54) [firefox #2] at self.promiseDispatch.done (d:\Users\Saifur\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:826:30) [firefox #2] at Promise.promise.promiseDispatch (d:\Users\Saifur\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:759:13) [firefox #2] at d:\Users\Saifur\AppData\Roaming\npm\node_modules\protractor\node_modules\q\q.js:573:44
[launcher] Runner process exited unexpectedly with error code: 1 [launcher] 1 instance(s) of WebDriver still running
..
[chrome #1] PID: 8084 [chrome #1] Specs: e:\working\protractor-e2e\specs\smoke\giftengHomePageTests.js [chrome #1] [chrome #1] Using ChromeDriver directly... [chrome #1] gifteng page [chrome #1] Should pop up sign in modal box - pass [chrome #1] WARNING - more than one element found for locator By.xpath("//img[contains(@src,'welcome/gift.jpg')]") - the first result will be used [chrome #1] Should navigate to gifteng Give page - pass [chrome #1] [chrome #1] [chrome #1] Finished in 7.522 seconds [chrome #1] 2 tests, 2 assertions, 0 failures [chrome #1] [launcher] 0 instance(s) of WebDriver still running [launcher] firefox #2 failed with exit code: 1 [launcher] chrome #1 passed [launcher] overall: 1 process(es) failed to complete [launcher] Process exited with error code 100
Process finished with exit code 100
protractor
and post the complete traceback if possible? Thanks. – alecxe$ webdriver-manager status
,$ which webdriver-manager
and$ chromedriver --version
? – alecxeC:\working\protractor-e2e\protractor-e2e>webdriver-manager status selenium standalone is not present chromedriver is not present IEDriver is not present C:\working\protractor-e2e\protractor-e2e>which webdriver-manager 'which' is not recognized as an internal or external command, operable program or batch file. C:\working\protractor-e2e\protractor-e2e>chromedriver --version 'chromedriver' is not recognized as an internal or external command, operable program or batch file.
however my tests are running fine. – Saifur