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,090 points
64 views

1 answer to this question.

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,710 points

Related Questions In Selenium

0 votes
1 answer
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,510 points
10,241 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,460 points
5,885 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,890 points
4,180 views
0 votes
2 answers
0 votes
2 answers

What is following-sibling in selenium?

Xpath=//*[@type='text']//following::input[2] READ MORE

answered Sep 4 in Selenium by Sri
• 2,970 points
7,125 views
0 votes
2 answers

What is Page Object Model in Selenium WebDriver?

POM is one of design pattern. maintenance  should ...READ MORE

answered Sep 4 in Selenium by Sri
• 2,970 points
420 views
0 votes
2 answers
0 votes
2 answers

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

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

answered Sep 4 in Selenium by Sri
• 2,970 points
833 views
0 votes
2 answers

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

Hi , Maven is a build tool . Why ...READ MORE

answered Sep 2 in Selenium by Sri
• 2,970 points
370 views