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 18, 2018 in Selenium by kappa3010
• 2,090 points
467 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,500 points
17,432 views
0 votes
1 answer

In Selenium why does Firefox requires GeckoDriver?

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

answered May 8, 2018 in Selenium by Meci Matt
• 9,460 points
7,312 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,910 points
9,981 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,190 points
1,795 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,190 points
11,767 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,190 points
1,418 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,190 points
2,890 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 3, 2020 in Selenium by Sri
• 3,190 points
1,330 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