Hire QA – Specialized in QA Recruitment, Technical Interviews and Testing Solutions

What are basic Xpath Symbol available in Selenium WebDriver?

Category: Selenium WebDriver
Xpath Symbols
//tagname[@attribute-name=’value1′]
//*[@attribute-name=’value1′]

Xpath Generation using different other methods
Xpath=//*[contains(@type,'sub')]
Xpath=//*[@type='submit' OR @name='btnReset']
Xpath=//input[@type='submit' and @name='btnLogin']
Xpath=//label[starts-with(@id,'message')]
Xpath=//td[text()=‘textname']
Xpath=//*[@type='text']//following::input
Xpath=//*[text()=‘textvalue']//ancestor::div
Xpath=//*[@id=‘idname']/child::li
Xpath=//*[@type=‘typename']//preceding::input
Xpath=//*[@type=' typename ']//following-sibling::input
Xpath=//*[@id=' idname']//parent::div

Leave a Reply

Your email address will not be published. Required fields are marked *