You are on page 1of 1

XPATH Additional Selectors

************************************************************************
Next Element - any element on the document next to this element.
//*[@id='txtSearchData']/following::span[text()='OK']
************************************************************************
Previous Element - any element on the document previous to this element.
//*[@id="ManualAddress"]/preceding::span[1]
************************************************************************
Note : These are very useful for same kind of objects in the application
Example : OK on Page1 with username textbox
Ok on Page 2 with File Upload Textbox

Then Make path for Ok button1 with refernce to username


Then Make path for Ok button2 with refernce to File Upload Textbox

You might also like