protractor
protractor copied to clipboard
Cant seem to pass args to Chrome
Apologies up front for asking a question here as I've come to a dead end.
I believe this question is similar to this one month old Stack Overflow question...
I've installed protractor and webdriver-manager as per the tutorial on Mac OS X.
This is my config.js
exports.config = {
seleniumAddress: 'http://localhost:4444/wd/hub',
baseUrl: 'https://localhost/mobile',
specs: ['test.js'],
'browserName': 'chrome',
'chromeOptions': {
'args': [
'--keep-alive-for-test',
"--window-size=320,580",
'--test-type',
'--use-mobile-user-agent',
'--user-agent="Mozilla/5.0 (iPhone; CPU iPhone OS 7_0 like Mac OS X; en-us) AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0 Mobile/11A465 Safari/9537.53"'
]
}
};
none of these arguments to chrome are having any effect to on the Chrome instance that starts up.
Am I doing something wrong ?
Think you are missing the capabilities. This works for me:
specs: [
'test/protractorTests/**/*.js'
],
capabilities: {
'browserName': 'chrome',
'chromeOptions' : {
args: ['--lang=en']
}
},
@zakrhol Thanks a lot dear. Don't know how i missed that (facepalm)