0
0
Selenium Javatesting~10 mins

ChromeOptions configuration in Selenium Java - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to create a ChromeOptions object.

Selenium Java
ChromeOptions options = new [1]();
Drag options to blanks, or click blank then click option'
AChromeOptions
BChromeDriver
CFirefoxOptions
DWebDriver
Attempts:
3 left
💡 Hint
Common Mistakes
Using ChromeDriver instead of ChromeOptions.
Using FirefoxOptions which is for Firefox browser.
2fill in blank
medium

Complete the code to add the argument to start Chrome maximized.

Selenium Java
options.[1]("--start-maximized");
Drag options to blanks, or click blank then click option'
AaddArguments
BsetArguments
CaddArgument
DaddArgs
Attempts:
3 left
💡 Hint
Common Mistakes
Using setArguments which does not exist.
Using addArguments with wrong spelling.
3fill in blank
hard

Fix the error in the code to set headless mode.

Selenium Java
options.[1]("--headless");
Drag options to blanks, or click blank then click option'
AsetHeadless
BaddArguments
CsetArguments
DaddArgument
Attempts:
3 left
💡 Hint
Common Mistakes
Using setHeadless which does not exist.
Using addArgument (singular) which is incorrect.
4fill in blank
hard

Fill both blanks to set experimental options and disable automation info bar.

Selenium Java
Map<String, Object> prefs = new HashMap<>();
prefs.put("[1]", false);
options.[2]("prefs", prefs);
Drag options to blanks, or click blank then click option'
AuseAutomationExtension
BsetExperimentalOption
CdisableAutomationExtension
DsetPreference
Attempts:
3 left
💡 Hint
Common Mistakes
Using setPreference which does not exist.
Using disableAutomationExtension which is not a preference key.
5fill in blank
hard

Fill all three blanks to create ChromeOptions with headless mode, disable GPU, and set window size.

Selenium Java
ChromeOptions options = new ChromeOptions();
options.[1]("--headless");
options.[2]("--disable-gpu");
options.[3]("--window-size=1920,1080");
Drag options to blanks, or click blank then click option'
AaddArguments
BsetArguments
Attempts:
3 left
💡 Hint
Common Mistakes
Using setArguments which does not exist.
Using addArgument (singular) which is incorrect.