Chapter 5. Synchronizing Tests

In this chapter, we will cover the following:

  • Synchronizing a test with an implicit wait
  • Synchronizing a test with an explicit wait
  • Synchronizing a test with custom-expected conditions
  • Synchronizing a test with FluentWait

Introduction

While building automated scripts for a complex web application using Selenium WebDriver, we need to ensure that the test flow is maintained for reliable test automation.

When tests are run, the application may not always respond with the same speed. For example, it might take a few seconds for a progress bar to reach 100 percent, a status message to appear, a button to become enabled, and a window or pop-up message to open.

You can handle these anticipated timing problems by synchronizing your test to ensure that Selenium WebDriver waits until your application is ready before performing the next step. There are several options that you can use to synchronize your test. In this chapter, we will see various features of Selenium WebDriver to implement synchronization in tests.

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

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