I have a web page with a grid, and some columns have a link in the column header that will sort the values by that column [by round-tripping to the server].
I want to write a single Watir test that will identify those sorting links and click each one in succession. This is a smoke test that ensures there are no runtime exceptions resulting from the sort expression.
My question is, what is the best way to (1) identify these links, and (2) click each one in succession? This is what I have so far:
$ie.table(:id, "myGrid").body(:index, 1).each do | row |
row.each do | cell |
## todo: figure out if this contains a sort link
## todo: click the link now, or save a reference for later?
end
end