Sometimes we need to do more than test whether a particular piece of text is on the page. Using XPath, we can examine the DOM (the structure of elements making up the page) and get ourselves a nice extra bit of information that we can use to write more robust tests.
In our example, we have a table of results, and we want to test the number of rows that are in the table. We might be using an API function or a node edit form in order to add some information, and as that information is added, we would expect to see more and more rows in the table.
Read »








