- Open the file that you used to perform the previous exercise.
- Use the get() method with the driver object to navigate to the desired web application URL (we'll use https://www.google.com in this activity).
public void activityLesson02AutomationScript() {
WebDriver driver = new ChromeDriver();
driver.get("https://www.google.com");
driver.quit();
}
- Compile and execute the script.
- Navigate to www.google.com.
When the page has finished loading, the browser will close.