Closed ayanmodak closed 7 years ago
Probably you should use a different way to set the size for chrome windows, I generally use capabilities args and also I always avoid using maximize in my scripts.
var Jasmine2HtmlReporter = require('protractor-jasmine2-html-reporter');
var basePath = __dirname + '/reports/';
exports.config = {
params: {
timeoutLogin: 10000,
timeout : 60000,
raceTimeOut : 3000
},
allScriptsTimeout: 60000,
// The address of a running selenium server.
seleniumAddress: 'http://localhost:4444/wd/hub',
// Capabilities to be passed to the webdriver instance.
capabilities: {
'browserName': 'chrome',
'logName': 'Chrome',
'count': 1,
'chromeOptions': {
'args': ['incognito', '--lang=en', '--window-size=1366,768']
}
},
framework: 'jasmine',
// Spec patterns are relative to the current working directly when
// protractor is called.
specs: ['e2e/**/*.js'],
...
...
Indeed @rahulmr
However, I think I will suggest a way to specify the expected version of protractor, as I have done for another project: https://github.com/rochejul/sequelize-mocking/issues/9
Regards
@ayanmodak @rochejul I found that there is a second reason for that. My tests did fail in scenarios different than changing screen resolution.
The problem is that the current webdriver manager is still fetching 2.25 version of ChromeDriver as the most recent one. It does not support Chrome 57 (https://chromedriver.storage.googleapis.com/2.28/notes.txt)
The easiest solution for now is to set forced chromedriver versions in webDriver config, example below:
.pipe(gulpProtractorAngular({
// ...
'webDriverUpdate': {
args: ['--versions.chrome', '2.28']
},
'webDriverStart': {
args: ['--versions.chrome', '2.28']
}
}))
All credits for that hint should go to Michael Romanov who suggested that solution in SO answer: http://stackoverflow.com/a/42825715/243899
Regards Piotr
@veritas I have been working through this same problem. I tried including this in my gulpfile but now it is complaining that chromedriver_2.28mac64.zip
doesn't exist. Have you found a way around this? The problem I see is that even if i manually include this file, next time i install packages it will be overwritten.
It seems the chromedriver downloaded by this module is not upto date. Following is not working
browser.driver.manage().window().setSize(1280, 780);
getting the error below. Though this method is working properly with protractor command and webdriver-manager's chromedriver.