0 votes
in Selenium by
What is the difference between single and double slash in Xpath?

1 Answer

0 votes
by

Single slash is used to create Xpath with an absolute path i.e. the XPath would be created to start selection from the start node.

/html/body/div[2]/div[1]/div[1]/a

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

//div[class="qa-logo"]/a

Related questions

0 votes
0 votes
asked Jan 5 in Selenium by rajeshsharma
0 votes
asked Jan 30, 2020 in Selenium by rajeshsharma
...