Closed Mike-Hardy closed 9 years ago
+1 same problem. Environment: "protractor": "^1.5.0", "grunt-protractor-runner": "^1.1.4", "jasmine-reporters": "^1.0.1", "grunt-protractor-webdriver": "^0.2.0"
I've resolved this by specifying the binary in 'chromeOptions'
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
specs: ['../src/UI.NodeE2ETests/tests/**/*spec.js'],
multiCapabilities: [{
'browserName': 'chrome',
'chromeOptions': {
binary: 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe',
args: [],
extensions: [],
}
}, {
'browserName': 'firefox'
}],
maxSessions: 1,
jasmineNodeOpts: {
defaultTimeoutInterval: 180000,
isVerbose: true,
showColors: true,
includeStackTrace: true
},
allScriptsTimeout: 180000,
framework: 'jasmine',
onPrepare: function() {
if (process.env.TEAMCITY_VERSION)
{
require('jasmine-reporters');
jasmine.getEnv().addReporter(new jasmine.TeamcityReporter());
}
}
}
@MrDefinite can you confirm that you are able to resolve this in the same way ? Note: i have chrome installed globally hence the location C:/Program Files (x86)/Google/Chrome/Application/chrome.exe
@spikeybill No...I got same error using your way. In addition, if I set Selenium server keep alive, no error will be throw. However I think it maybe not good because I want my tests run on Jenkins.
@MrDefinite well i think that specifying keepalive and the chrome binary location has solved this for me. The fact that you are not getting Error: ECONNREFUSED connect ECONNREFUSED probably means that the chrome exe has been located. Would you like to post another issue with all your package, protractor config, gruntfile. jenkins config ? I will close this issue as it is non jenkins related.
@ mention me in the new issue so i can take a look
I'm also experiencing this issue. It only happens on Windows and the only solution I've found is to set keepAlive
to true. The downside with that solution is that it leaves the selenium process running.
Same issue for me, on MAC (using latest version of protractor): 1 spec, 0 failures Finished in 8.133 seconds Shutting down selenium standalone server. Unhandled error: Error: ECONNREFUSED connect ECONNREFUSED 192.168.1.152:49520 Unhandled error: Error: ECONNREFUSED connect ECONNREFUSED 192.168.1.152:49520
I managed to solve it by setting: directConnect: true Sadly, this solution doesn't work for safari: Error: browserName (safari) is not supported with directConnect.
BTW, I confirmed I have the error because I use: browser.forkNewDriverInstance(); If I use only one browser, then the error also disappears. (But I have to use two browsers in my tests because it's for a multiplayer game :))
I managed to solve it (even for Safari) by running selenium standalone server using another grunt plugin: https://www.npmjs.com/package/grunt-selenium-standalone
Before the protractor trask I start the selenium server, and I stop it afterward: selenium_standalone:seleniumTask:start, ... selenium_standalone:seleniumTask:stop,
directConnect: true
Solves the problem for Chrome and FF.
I am using directConnect: true
but still getting the issue
when running Chrome in multicapabilities. Running on Windows 8.1 x64.
Gruntfile.js =
package.json =
protractorConfig.js =
Output from tests =
Note we are running grunt from F# Fake, but this should have no bearing on this error.
If i change my protractorConfig to use
then i do not get the error.