Tuesday, August 11, 2015

position function in xpath



<<Previous                                                                            Next >>

 Position function in Xpath 
 
1st element 2nd element 3rd element
4th element 5th element 6th element
7th element 8th element 9th element
10th element 11th element 12th element




To get 2nd row in the above table we can use //tr[position()=2]

To get last row use //tr[last()]

To get 3rd row use //tr[last()-1]







Test contains function in xpath


<<Previous                                                                            Next >>

No comments:

Post a Comment