I'm trying to set the chromeOptions in my protractor config file via the following command:
protractor conf.js --capabilities.chromeOptions.args.0 start-fullscreen --capabilities.chromeOptions.args.1 display --capabilities.chromeOptions.args.2 :99
I'm expecting the outcome to look something like this:
...
capabilities: {
'browserName': 'chrome',
'chromeOptions': {
'args': ['start-fullscreen','display',':99']
}
},
...
When I try running the command however, I get the following error in webdriver
...
Caused by: org.openqa.selenium.WebDriverException: unknown error: cannot parse capability: chromeOptions
from unknown error: cannot parse args
from unknown error: must be a list
...
I'm unsure how to structure my command line arguments such that it produces args as a list, or if the functionality is simply not supported.
Here is a post where someone tries something similar, where the functionality seems to be intentionally left out. However, this post seems to imply that the functionality was recently added.
If it is not possible to set via command line, is there a work around? I need to change the display for every protractor call, maybe it can be done in onPrepare via params (note: params can't be referenced in the conf.js outside of onPrepare).