What is the difference between and in xpath

0 votes
What is the difference between / and // in selenium?

How can these two be used?
Dec 25, 2018 in Selenium by Anjali
• 2,950 points
26,954 views

2 answers to this question.

0 votes

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.

Hope this helps. 

answered Dec 25, 2018 by Shuvodip
0 votes
/ - Selects from the root node

// - Selects nodes in the document from the current node that match the selection no matter where they are
answered May 29, 2019 by anonymous
Can you explain it in detail with an example?

Related Questions In Selenium

0 votes
1 answer

What is the difference between dot and text() in XPath?

Even though there is some difference between ...READ MORE

answered Apr 25, 2018 in Selenium by king_kenny
• 3,710 points
7,721 views
0 votes
2 answers
+1 vote
2 answers

What is the difference between findElement and findElements in Selenium Webdriver?

FindElement Command -This method locates for the ...READ MORE

answered Feb 11, 2020 in Selenium by anonymous
8,003 views
0 votes
1 answer

What is the difference between WebDriver and RemoteWebdriver in Selenium?

Hey Ishan, the difference between Webdriver and ...READ MORE

answered May 10, 2019 in Selenium by Pratibha
• 3,690 points
10,315 views
0 votes
2 answers

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,500 points
12,576 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31, 2020 in Selenium by Sri
• 3,190 points
8,558 views
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,910 points
6,603 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 3, 2020 in Selenium by Sri
• 3,190 points
7,506 views
0 votes
3 answers

What is the difference between relative and absolute XPath?

Absolute Xpath: It contains the complete path ...READ MORE

answered Dec 20, 2018 in Selenium by Nabarupa
65,308 views
0 votes
1 answer

What is the difference between getWindowHandle() and getWindowHandles() methods in Selenium WebDriver?

Hey Jennifer, difference between getWindowHandle() and getWindowHandles() ...READ MORE

answered Jun 4, 2019 in Selenium by Anvi
• 14,150 points
13,500 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP