Activity: Starting and Finalizing a Script

  1. Open the file that you used to perform the previous exercise.
  2. 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();
}
  1. Compile and execute the script.
  2. Navigate to www.google.com.

When the page has finished loading, the browser will close.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.219.236.62