How can I access the parent of a node with XPath?

0 votes
How can I access the parent of a node with XPath?
Jun 21 in Selenium by Hemant
78 views

1 answer to this question.

0 votes

Hey Hemant, we can use the double dot (“..”) to access the parent of any node using the XPath. For example – The locator //span[@id=”first”]/.. will return the parent of the span element matching id value as ‘first.

answered Jun 23 by Anvi
• 13,240 points

Related Questions In Selenium

0 votes
1 answer

How can I select a particular node within the XPath node sets by index?

There is no concept of 'i' in ...READ MORE

answered Apr 20, 2018 in Selenium by king_kenny
• 3,650 points
526 views
0 votes
2 answers
+2 votes
2 answers

How can I press ENTER key with the execute_script in selenium python?

The below code containing Keys.ENTER might just ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,090 points
7,180 views
0 votes
2 answers
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,090 points
741 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

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

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
706 views
0 votes
1 answer

How can I use HTML Unit Driver as a headless browser with Selenium?

Hello @Nishant, follow these steps to use ...READ MORE

answered May 17 in Selenium by Anvi
• 13,240 points
168 views
0 votes
1 answer

How can I clear the text in a text box using Selenium WebDriver?

Hello Akriti, you can clear the text ...READ MORE

answered May 29 in Selenium by Anvi
• 13,240 points
245 views