Interview Questions

Selenium WebDriver - How do you identify the Xpath of element on your browser ?

Selenium WebDriver Interview question and Answers


(Continued from previous question...)

Selenium WebDriver - How do you identify the Xpath of element on your browser ?

to find the xpath , we use Firebug addons on firefox browser and to identify the xpath written we use Firepath addons.
Syntax- //htmltag[@attname='attvalue'] or //html[text()='textvalue'] or
//htmltag[contains(text(),'textvalue')] or
//htmltag[contains(@attname,'attvalue')]
1

Syntax- //htmltag[@attname='attvalue'] or //html[text()='textvalue'] or
//htmltag[contains(text(),'textvalue')] or
//htmltag[contains(@attname,'attvalue')]

(Continued on next question...)

Other Interview Questions