Activity: Filling in a Form and Submitting it

Scenario

In the different concepts of this section, we have worked on interacting with many types of web elements that belong to a form. In this activity, we'll make use of the different concepts to create an automation script that interacts with the different types of elements on a web page.

Aim

To create a full automation script that interacts with different types of elements on a web page.

Steps for Completion

  1. Review and analyze the structure and behavior of the https://trainingbypackt.github.io/Beginning-Selenium/lesson_3/exercise_3_1.html file.
  2. Create a new Java file for the automation script. Make sure that you include the required libraries.
  3. Locate the textbox of id "firstName", and input some text. In this case, input "John".
  4. Locate the textbox of id "lastName", and input some text ("Doe").
  5. Locate the dropdown list of id "dayOfBirth"; select the option "20".
  6. Locate the dropdown list of id "monthOfBirth"; select the option "March" by sending its value.
  7. Locate the dropdown list of id "yearOfBirth"; select the option "1990" by sending its value.
  8. Locate the dropdown list of id "hobbies"; select these two options: Reading and Sports.
  9. Locate the radio button "Masters"; select a radio button by clicking on it after it has been selected.
  10. Locate the checkbox "emailUpdates". and enable the "I want to receive email updates" field.
  11. Locate the textarea of id "aboutYourself", and input some text.
  12. Include an instruction to click on the Submit button.
  13. Compile and run the script.

To refer to the detailed steps, go to the Solutions section at the end of 
this book on Page no. 165.

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

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