Selenium XPath Tutorial #9 - Axes Methods | ancestor, ancestor-or-self

preview_player
Показать описание
In this Selenium XPath tutorial we will learn about XPath axes method ancestor and ancestor-or-self with examples.

XPath axes ancestor method helps in selecting all the ancestor nodes of the current node.

XPath axes ancestor-or-self method helps in selecting current node as well as all the ancestor nodes of current node. Watch the full tutorial to understand XPath axes ancestor methods with examples.

Help me in spreading the knowledge, please hit LIKE, SHARE and SUBSCRIBE for latest tutorials. More tutorial playlists below:

🔶 ENROL IN MANY FREE TRAININGS ON RCV ACADEMY PORTAL 🔶

🔶 FOLLOW US ON TWITTER 🔶

🔶 LIKE US ON FACEBOOK 🔶

🔶 OUR TUTORIAL WEBSITES 🔶

🔶 GET MY TRAININGS ON UDEMY 🔶
#XPathTutorial #XPath #SeleniumXPath #SeleniumTutorial #TestAutomation #SoftwareTesting #RcvAcademy #SoftwareTestingMentor
Рекомендации по теме
Комментарии
Автор

It would be helpful it you attach this ppt as well in the description of the video for quick access and quick revision.

sakshiaggarwal
Автор

Notes: Selenium XPath Tutorial #9 - Axes Methods: `ancestor` and `ancestor-or-self`

1. Introduction:
- These methods select ancestors (parent nodes, grandparents, etc.) of the context node in the HTML DOM structure.

2. `ancestor` Method:
- `ancestor` selects all ancestors based on the specified tag name.
- Context node is not included in the selection.

3. `ancestor-or-self` Method:
- `ancestor-or-self` is similar to `ancestor`, but includes the context node if the tag names match.
- If the tag names differ, the context node is omitted from the selection.

4. Example:

5. Using `ancestor-or-self`:

manoj_mafiosi