xpath nearest element to a given element

Posted by nologo on Stack Overflow See other posts from Stack Overflow or by nologo
Published on 2011-01-06T11:52:22Z Indexed on 2011/01/06 11:53 UTC
Read the original article Hit count: 128

Filed under:
|

hi, having trouble returning an element using xpath.. i need to get the text from the 2nd TD..

<tr> <td> <label for="PropertyA">Some text here </label> </td> <td> TEXT!! </td> </tr>

i'm able to find the label element but then im having trouble selecting the td following to return the text.

this is how i select the label:

"//label[@for='PropertyA']"

thanks

© Stack Overflow or respective owner

Related posts about xpath

Related posts about selenium