September 2014
Intermediate to advanced
270 pages
6h 1m
English
At this point, our test is no longer recognizable compared to what it was at the beginning of the chapter. Before we wrap it up, let's talk about the generic action used all through our tests. Throughout the test code, we use some common methods to perform actions such as clicking or typing text into a text field. These chained methods look something like this:
What if we refactor these methods a little further and create some generic private methods that can be used in a much simpler way? Let's start with the most common method used, @selenium.find_element, and create a generic find_element method:
Our find_element method ...
Read now
Unlock full access