Notes: Selenium XPath Tutorial #8 - Axes Method: `descendant` and `descendant-or-self` 1. Introduction: - These methods are used to select descendants of the context node (current node in the HTML DOM or XML). 2. Descendant Method: - `descendant` selects all descendants (children, grandchildren, etc.) of the context node. - Format: `//tagname[@attribute='value']` or `//tagname[*[@attribute='value']]`. - Example: `//div[@class='signup-container']//div` selects all `div` elements with class `signup-container` and their descendant `div` elements. 3. Descendant-or-Self Method: - `descendant-or-self` is similar to `descendant` but includes the context node itself. - It selects the context node and all its descendants. - Format: `//tagname[@attribute='value']/descendant-or-self::tagname[@attribute='value']`. - Example: `//div[@class='signup-container']/descendant-or-self::div[@class='promo-regular']` selects the `div` with class `signup-container` and descendant `div` elements with class `promo-regular`. 4. Customizing XPath: - You can omit tag name and use a wildcard `*` for any element with specific attributes. - XPath customization requires practice, research, and experimentation with different combinations. Conclusion: - Understanding `descendant` and `descendant-or-self` axes methods is crucial in XPath. - XPath mastery enhances web element identification and automation efficiency. - Thank you for watching this tutorial.
the correct format descendant - //tagname[@attribute='value']//descendant::tagname descendant or self - //tagname[@attribute='value']//descendant-or-self::tagname[@attribute='value']
Hello Sir, i liked your tutorial and the pace in which you are teaching for free..., but i am not understanding the application of learning descendant, ascendant, or self.. pls give relevant examples where we can apply these learnings. We only identified in the browser Ctrl F, how are we using it in the test program? pls explain
Amazing content, i need help I successfully navigated to my Web element, got result 1 of 1 but if i click on that element i got Unable to locate element exception, what should i do?
This mentor is the best, his voice is good for me
Notes: Selenium XPath Tutorial #8 - Axes Method: `descendant` and `descendant-or-self`
1. Introduction:
- These methods are used to select descendants of the context node (current node in the HTML DOM or XML).
2. Descendant Method:
- `descendant` selects all descendants (children, grandchildren, etc.) of the context node.
- Format: `//tagname[@attribute='value']` or `//tagname[*[@attribute='value']]`.
- Example: `//div[@class='signup-container']//div` selects all `div` elements with class `signup-container` and their descendant `div` elements.
3. Descendant-or-Self Method:
- `descendant-or-self` is similar to `descendant` but includes the context node itself.
- It selects the context node and all its descendants.
- Format: `//tagname[@attribute='value']/descendant-or-self::tagname[@attribute='value']`.
- Example: `//div[@class='signup-container']/descendant-or-self::div[@class='promo-regular']` selects the `div` with class `signup-container` and descendant `div` elements with class `promo-regular`.
4. Customizing XPath:
- You can omit tag name and use a wildcard `*` for any element with specific attributes.
- XPath customization requires practice, research, and experimentation with different combinations.
Conclusion:
- Understanding `descendant` and `descendant-or-self` axes methods is crucial in XPath.
- XPath mastery enhances web element identification and automation efficiency.
- Thank you for watching this tutorial.
your format here is wrong bro .......check it up
the correct format
descendant - //tagname[@attribute='value']//descendant::tagname
descendant or self - //tagname[@attribute='value']//descendant-or-self::tagname[@attribute='value']
Very good explanation! Great to follow your videos
thank you
thank you sir
this playlist is very helpful ❤
Hello Sir, i liked your tutorial and the pace in which you are teaching for free..., but i am not understanding the application of learning descendant, ascendant, or self.. pls give relevant examples where we can apply these learnings.
We only identified in the browser Ctrl F, how are we using it in the test program? pls explain
Where is Salesforce lighting platform in normal developer edition I am unable to select the xpath acess methods
Amazing content, i need help
I successfully navigated to my Web element, got result 1 of 1 but if i click on that element i got Unable to locate element exception, what should i do?