Project description

Helper class to make working with Selenium explicit waits easier and
more accessible

Explicit is designed to minimize or eleminate the common frustrations encountered when using
Selenium on webpages with dynamicly loaded and/or javascript driven content. Typically, a developer
will try to use the webdriver’s default find_element_by_<XPATH, CSS, ID, LINK TEXT, ETC> to
locate an element, only to get hit with various exceptions like NoSuchElementException,
StaleElementReferenceException, and so on.

Selenium includes several tools to address these limitations, most notibly implicit and explicit
waits. While enabling the implicit wait is easy to do, it becomes increasingly problematic as
scripts become more complex. Explicit waits offer a much more powerful alternative, giving the
developer more fine tuned controls, but at the expense of added complexity.

The Explicit package abstracts away the complexities associated with explicit waits by wrapping
commonly used functionality in an easy to use API.

Consider this example:
You want to use Selenium to log into Github from the 404 page. You write a script like this to fill
in the login credentials and click the login button:

The reason for the execption, which might not be readily apparent, is that the login modal on that
page loads in after the page loads. When the script runs it attempts to immediately find the field
element after control is returned from the driver.get call. Since the element isn’t in the DOM
yet, Selenium throws the NoSuchElementException.