oleg-andreyev / MinkPhpWebDriver

Webdriver driver for Mink framework
MIT License
8 stars 9 forks source link

Allow setting browser commandline args via capabilities #89

Open jan-imrich opened 1 month ago

jan-imrich commented 1 month ago

When using this driver from behat, there is no way of setting the browser commandline args (ie. --headless or --start-maximized for chrome).

mink-selenium2-driver allows to specify chromeOptions under extra_capabilities (and similar with other browsers). It would be nice if it was compatible, so you could switch between mink-phpwebdriver-extension and mink-selenium2-driver.

I have tried to hardcode $capabilities['goog:chromeOptions']['args'] = ['--start-maximized']; into buildDriver() metod and it seems to work, so it should be a matter of just passing those arguments through.

Maybe there already is other way of doing this, but I couldn't figure it out.