Richard, the examples I provided I think is pretty much what I got
from Firebug and related extensions, except for the hyperlink element
where I added text()='delete' to better define it.
Though I typically don't take the XPath generated from the extensions.
I inspect the element to see the HTML source around it and then
backtrack up the source tree to see how I can then best define the
XPath based on element text and attributes rather than a nesting of
element types (w/o attributes and element text) that you get from the
browser plugins. But in the case of DOJO table grids, you don't really
get much uniqueness other than some random IDs for attributes, so you
may have to use the nested element method like my example XPaths.
But what I learned from searching online is that when you get multiple
matches for an XPath that you can't refine any more and you only want
a particular match out of the set, you have to enclose the XPath in
parenthesis like in my examples, then append node position for the
exact one you're interested in. You can loop through with an index
variable for position if need to process them all one at a time. I
believe Selenium can't handle a set, so you have to process one at a
time. If you leave out the parenthesis, and just append position to
XPath, Selenium may have issues finding the element. I forget where I
found that info online, it's been a while.