Complete the code to start a Selenium WebDriver for Chrome.
WebDriver driver = new [1]();The ChromeDriver is used to start a Chrome browser session in Selenium.
Complete the code to assert the page title is 'Home Page' after loading.
assertEquals("Home Page", driver.[1]());
The getTitle() method returns the page title, which we compare to 'Home Page'.
Fix the error in the test annotation to enable JUnit 5 test execution.
@[1]
public void testLogin() {
// test code
}The correct JUnit 5 annotation to mark a test method is @Test.
Fill both blanks to wait up to 10 seconds for an element with id 'submit' to be clickable.
WebDriverWait wait = new WebDriverWait(driver, Duration.[1](10)); wait.until(ExpectedConditions.[2](By.id("submit")));
Duration.ofSeconds(10) sets a 10-second wait, and elementToBeClickable waits for the element to be clickable.
Fill all three blanks to create a map of test names to their pass status, filtering only passed tests.
Map<String, Boolean> passedTests = testResults.entrySet().stream()
.filter(e -> e.getValue() [1] true)
.collect(Collectors.toMap(e -> e.getKey(), e -> e.getValue() [2] true));
System.out.println(passedTests.[3]());The filter uses == true to check boolean values, the map keeps the value as is, and size() prints the count of passed tests.