In my test code, I define some capabilities and get ChromeDriver like this:
WebDriver driver = new ChromeDriver(capabilities);
But I need to open Chrome in full screen in Mac OS X. I searched and saw that this code is used to maximize:
ChromeOptions chromeOptions = new ChromeOptions();
chromeOptions.addArguments("--kiosk");
driver = new ChromeDriver(chromeOptions);
But I have to use capabilities with Chrome driver and there is no ChromeDriver constructor that takes options ve capabilities. How can I use ChromeDriver capabilitest and options to open Chrome maximize in Mac OS X?
You can add
chromeOptions
tocapabilities