I have the following config in acceptance.suite.yml to run chrome in headless mode, and this works fine:
args: ["--headless", "--disable-gpu", "--no-sandbox", "window-size=1920x1080"]
However, in other environments (eg. while developing new tests), I sometimes want to be able to see chrome opening and observe the tests running. The trouble is, I can't find a way to conveniently disable "--headless" when running the tests.
What I have tried:
1 Supplying an alternate config as commandline arguments:
php codecept.phar run acceptance -o "modules: config: WebDriver: capabilities: chromeOptions: "
2 Supplying an alternate config in a different environment
php codecept.phar run acceptance --env local
Neither method works. The key problem seems to be: how do you override "chromeOptions", or "chromeOptions: args", with nothing, ie. an empty configuration set? That seems to be impossible.
Even if I could somehow unset the "--headless" arg, that would be progress.