Complete the code to declare the WebDriver variable in the test class.
private WebDriver [1];The WebDriver variable is commonly named driver in Selenium test classes for clarity and convention.
Complete the code to initialize the page object in the test setup method.
loginPage = new LoginPage([1]);The page object constructor requires the WebDriver instance, which is driver in the test class.
Fix the error in the test method to call the login method from the page object.
loginPage.[1]("user", "pass");
The page object method to perform login is named login, so calling loginPage.login() is correct.
Fill both blanks to assert the page title after login.
assertEquals([1], driver.[2]());
getCurrentUrl() instead of getTitle() to check the page title.After login, the expected page title is "Dashboard" and the WebDriver method to get the title is getTitle().
Fill all three blanks to properly close the browser after tests.
if (driver != null) { driver.[1](); driver = [2]; loginPage = [3]; }
driver.close() which only closes one window, not the entire browser session.To close the browser, call driver.quit(). Then set driver and loginPage to null to clean up references.