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
11 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,590 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,050 points
4,263 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
4,007 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,195 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
85 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,675 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
95 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
189 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
237 views