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
85 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,520 points
11,425 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
6,152 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
5,279 views
0 votes
2 answers

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

some of the controls not have id ...READ MORE

answered Sep 4, 2020 in Selenium by Sri
• 3,010 points
719 views
0 votes
2 answers

What is following-sibling in selenium?

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

answered Sep 4, 2020 in Selenium by Sri
• 3,010 points
8,476 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, 2020 in Selenium by Sri
• 3,010 points
537 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, 2020 in Selenium by Sri
• 3,010 points
1,039 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, 2020 in Selenium by Sri
• 3,010 points
424 views