Xpath Types
•Xpath using contains text
//div[contains(text(),'Sign up')]
•Xpath using text
//div[ (text()='Sign up')]
•Merge Xpath (combining two Xpaths together)
Xpath=(//input[@name='email'])[2]/div/div/a
•We can use multiple attributes inside the Xpaths
//input[@id='email'][@name='email']
•We can also use logical expressions like 'AND' 'OR' in an XPath expression
//input[@name='email' and @type='Phone']
//input[@name='email' or @type='Phone']
•Xpath using following, preceding
//table[@role='presentation']/following::input
//table[@role='presentation']/following-sibling::input
//table[@role='presentation']/ preceding::input
//table[@role='presentation']/ preceding-sibling::input