Interview Questions

Selenium WebDriver - What is the difference between “/” and “//” in Xpath?

Selenium WebDriver Interview question and Answers


(Continued from previous question...)

Selenium WebDriver - What is the difference between “/” and “//” in Xpath?

Single Slash “/” – Single slash is used to create Xpath with absolute path i.e. the xpath would be created to start selection from the document node/start node.
Double Slash “//” – Double slash is used to create Xpath with relative path i.e. the xpath would be created to start selection from anywhere within the document.

(Continued on next question...)

Other Interview Questions