Understanding loadable components

The loadable component is an extension of the PageObject pattern. The LoadableComponent class in the WebDriver library will help test-case developers make sure that the page or a component of the page is loaded successfully. It tremendously reduces the efforts to debug your test cases. The PageObject should extend this LoadableComponent abstract class and, as a result, it is bound to provide an implementation for the following two methods:

protected abstract void load()protected abstract void isLoaded() throws java.lang.Error

The page or component that has to be loaded in the load() and isLoaded() methods determines whether the page or component is fully loaded. If it is not fully loaded, it throws an error. ...

Get Selenium WebDriver 3 Practical Guide - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.