What purpose does this "::" solve in selenium?

0 votes
What exactly is the use of "::"? And besides the parent, what other different things can we use it for?

By.xpath("parent::*/parent::*")
Apr 17, 2018 in Selenium by kappa3010
• 2,010 points
8 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
Well this is not a Selenium functionality, but rather an XPath functionality. Basically, :: separates an axis name from a node test in an XPath expression. And that above is actually XPath syntax is.

Similar things you can do are:

child::*      ->  Selects all the child elements of the current node
attribute::*  ->  Selects all the attributes of the current node
child::text() ->  Selects the entire text present in the child node of current node
child::node() ->  Selects every child node of the current node
answered Apr 18, 2018 by king_kenny
• 3,590 points

Related Questions In Selenium

0 votes
1 answer

What are the differences between getText() and getAttribute() functions in Selenium WebDriver?

See, both are used to retrieve something ...READ MORE

answered Apr 5, 2018 in Selenium by nsv999
• 5,030 points
3,520 views
0 votes
1 answer

In Selenium why does Firefox requires GeckoDriver?

Firefox requires GeckoDriver because: For Mozilla Firefox till ...READ MORE

answered May 7, 2018 in Selenium by Meci Matt
• 9,400 points
3,480 views
0 votes
1 answer

How to eliminate this error”Cannot instantiate the type Select in selenium webdriver”

Try below code. Select sc = new Select(driver.findElement(By.xpath("your ...READ MORE

answered May 18, 2018 in Selenium by Samarpit
• 5,130 points
1,009 views
0 votes
1 answer

what is the need of xpath when you have attributes like id ,class,name in selenium?

It is not necessary that every element ...READ MORE

answered Jun 1, 2018 in Selenium by Vinita
• 220 points
52 views
0 votes
1 answer

What is following-sibling in selenium?

Here, ul has 8 children(8-li) on total.  And, ...READ MORE

answered Jun 1, 2018 in Selenium by Vinita
• 220 points
1,264 views
0 votes
1 answer

What is Page Object Model in Selenium WebDriver?

If you want to learn about Selenium ...READ MORE

answered Jun 14, 2018 in Selenium by Meci Matt
• 9,400 points
63 views
+1 vote
1 answer

What is locators used for in selenium?

Locator are used to find and match ...READ MORE

answered Dec 18, 2018 in Selenium by Nabarupa
22 views
0 votes
1 answer

What is the role of TestNG & JUnit frameworks in Selenium?

Well TestNG and JUnit are test frameworks ...READ MORE

answered Apr 18, 2018 in Selenium by king_kenny
• 3,590 points
130 views
0 votes
1 answer

How is Maven used with Selenium? Does it also do the testing?

You need to understand the basic processes ...READ MORE

answered Apr 13, 2018 in Selenium by king_kenny
• 3,590 points
203 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.