It’s entirely possible that I’m missing something fundamental, but this is a new realm for me and I could use some pointers. I’m getting started using Ruby and Watir to drive/test a web application that’s all AJAX-built. Many of the items don’t have explicit classes/ids, and the dev team of course uses jQuery to get to them. I’m looking for a way to translate their jQuery into Watir to use/modify/check values of the same objects.
For example, they use this to see if there are values in a data grid’s fifth column:
$("div.dataTable table tbody tr").has("td:eq(4):not(:empty)").length > 0
How would I go about doing something similar?
You could make the same check in Watir using:
You can write it all as one line, but I broke it up here for readability.