Tuesday, 23 December 2014

xpaths

First Row in a table:FIrst row is having class=odd

     $x("//tr[1][@class='odd']")

hyperlink in first row of a table:

     "//tr[1][@class='odd']/td[2]/a"  or    
     $x("//table/tbody/tr[1][@class='odd']/td[2]/a")    whole hierarchy.. test it in firebug console 

No comments:

Post a Comment