What is the difference between single and double slash in xpath?



What is the difference between single and double slash in xpath?..

Answer / Rajiv Ranjan Kumar

In XPath, a single slash (/) represents child selection, while a double slash (//) represents descendant selection. For example, /html/body selects the body element directly under the html element, while //div finds all div elements anywhere in the HTML structure.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Selenium Interview Questions

How to login into any site if it is showing an authentication pop-up for username and password?

1 Answers  


Can we edit recorded selenium ide test cases?

1 Answers  


What is the purpose of deselecting all() method?

1 Answers  


How you will login into any site if it is showing any authentication popup for username and password?

1 Answers  


What is the command to insert text into the HTML text box using Selenium?

1 Answers  


What kinds of test types are supported by selenium?

1 Answers  


What is the difference between the “type” and “typeAndWait” commands?

1 Answers  


Is webelement an interface or a class?

1 Answers  


Is there a way to refresh browser using selenium?

1 Answers  


Is it possible to automate the captcha using selenium?

1 Answers  


What is implicit wait in selenium webdriver?

1 Answers  


How to get a text of a web element?

1 Answers  


Categories