Activity: Creating an Explicit Wait

Before you Begin

Scenario

The web page we are performing the test on contains a button. By clicking on it, the values of the attributes of some elements are changed. To complete the automation process, we need to simulate the click of this button and then make our test wait before trying to find one of the elements whose attributes' values have changed.

Aim

To create a Selenium test that clicks on a button, and implement an explicit wait for the test.

Steps for Completion

  1. Review and analyze the DOM of the https://trainingbypackt.github.io/Beginning-Selenium/lesson_5/activity_5_B-1.html file, and see how elements are affected by the functionality of this file.
  2. Create a Selenium test that clicks on the available button by using the findElement method.
  3. Choose any of the elements whose attribute values are changed after clicking on the test button. Create an explicit wait for the chosen object.
  4. For each one of the instructions in step 3, check the contents of the title by using the if … else statement.
  5. Compile and run the test.

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

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

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