- Review and analyze the DOM of the https://trainingbypackt.github.io/Beginning-Selenium/lesson_5/exercise_5_1.html file, and see how elements are affected by the functionality of this file
- Create a Selenium test that clicks on the available button:
driver.findElement(By.id("runTestButton")).click();
- Choose any of the elements whose attribute values are changed after clicking on the test button. Create an explicit wait for the chosen object:
WebDriverWait wait = new WebDriverWait(driver, 5);
wait.until(ExpectedConditions.titleContains("Explicit"));
- For each of the instructions in step 4, check the contents of the title:
if (driver.getTitle().startsWith("Explicit")) {
System.out.println("ExplicitWait worked, the element contains 'Explicit'");
} else {
System.out.println("Something went wrong with ExplicitWait, 'Explicit' was not found");
}
- Compile and run the test.