Summary
In this chapter, we added a helpers
library with several methods to enhance our click
method. We then addressed bringing elements on screen if they are outside the viewport and using page synchronization to wait for flexible amounts of time for the page to build to ensure that our elements do not throw an error when testing. We added highlights as well as a spinner detector. We introduced the concept of class switching to try finding, and also included some details of execution speed.
Now that we have most of our supporting framework in place for the click()
method, let us do the same thing with setValue()
. This includes validating our input elements and using the quickest way to populate a field via the clipboard. Next, we’ll see how to enter text and replace dynamic data.