Complete the code to create a ChromeOptions object.
ChromeOptions options = new [1]();The ChromeOptions class is used to configure ChromeDriver settings before launching the browser.
Complete the code to add the argument to start Chrome maximized.
options.[1]("--start-maximized");
The method addArguments adds command-line arguments to ChromeOptions.
Fix the error in the code to set headless mode.
options.[1]("--headless");
The correct method to add the headless argument is addArguments.
Fill both blanks to set experimental options and disable automation info bar.
Map<String, Object> prefs = new HashMap<>(); prefs.put("[1]", false); options.[2]("prefs", prefs);
To disable the automation extension info bar, set the useAutomationExtension preference to false, then use setExperimentalOption to apply it.
Fill all three blanks to create ChromeOptions with headless mode, disable GPU, and set window size.
ChromeOptions options = new ChromeOptions(); options.[1]("--headless"); options.[2]("--disable-gpu"); options.[3]("--window-size=1920,1080");
The method to add command-line arguments is addArguments. The correct calls are to add headless, disable GPU, and set window size arguments.