Waiting for an Element with a Custom Written Condition

As we saw earlier, explicit waits allow you to build a test using many pre-conditions that are provided by the ExpectedConditions class. But what if these conditions are not sufficient to recreate a test scenario? The good news is that it is possible to implement the ExpectedCondition interface to create custom wait conditions as needed.

Custom conditions can be used in different scenarios, such as:

  • When waiting for an element to be found
  • When waiting for an element's attribute value to be updated
  • When waiting for an element to be visible or invisible
  • When waiting for DOM events
..................Content has been hidden....................

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