WHAT IS RELATIVE XPATH LOCATOR?



This locator is start with current element.
For example,
xpath=//td[4]
is the relative xpath locator for link22 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