button - cannot find the correct syntax for this -
i have row in table:
//*[contains(text(), 'cape town')]
and delete graphic:
//*[contains(@id, 'deletelinkbutton')]
in table.
how click on //*[contains(@id, 'deletelinkbutton')]
of row //*[contains(text(), 'cape town')]
?
if want find node xpath in relation node in cases don't want use absolute path starting /
or //
, instead use relative path .//*[contains(@id, 'deletelinkbutton')]
find descendants of context node id
attribute value contains deletelinkbutton
.
so javascript in browser have e.g.
var myrow = ...;
and call
myrow.ownerdocument.evaluate('.//*[contains(@id, 'deletelinkbutton')]', myrow, null, xpathresult.first_ordered_node_type, null).singlenodevalue.click();
Comments
Post a Comment