Activity: Starting and Finalizing a Script

Before You Begin

  • Make sure that you have followed the steps in Creating the Main Structure of Your First Selenium Automation Script.
  • Continue working on the Activity01Lesson02.java from Creating the Main Structure of Your First Selenium Automation Script.

Scenario

In the previous section, we created the main structure of the script, imported the required libraries, and instantiated our WebDriver. Now, we want to use some of the WebDriver methods to start and finalize the script.

Aim

To use the driver object to navigate to a desired web application URL.

Steps for Completion

  1. Open Activity01Lesson02.java that you used in the Creating the Main Structure of Your First Selenium Automation Script.
  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.
  3. Compile and execute the script.
  4. Navigate to http://www.google.com. When the page has finished loading, the browser will close.

To refer to the detailed steps, go to the Solutions section at the end of 
this book on Page no. 162.
..................Content has been hidden....................

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