WHAT IS ABSOLUTE XPATH LOCATOR?



This locator is start with root element.
For example,
xpath=/html/body/table[@id='table1']/tbody/tr/td
is the absolute xpath locator for link11 element in below HTML code:






<html>
<body>
<table id="table1" border="1" cellspacing="10" cellpadding="10">
<tbody>
<tr><td>link11</td><td>link12</td></tr>
<tr><td>link21</td><td>link22</td></tr>
</tbody>
</table>
</body>
</html>

Post a Comment

0 Comments