Selenium XPath Tutorial #4 - XPath Contains Function with Examples

preview_player
Показать описание
In this Selenium XPath tutorial we will learn about XPath "Contains" function with examples.

We will understand to identify dynamic webelements on any webpage in Selenium Automation using "contains" XPath function.

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
Рекомендации по теме
Комментарии
Автор

**Exploring the "contains" Function in XPath - Notes:**

- Introduction:
- Similar to "starts-with, " useful for locating dynamic web elements.

- Scenario:
- Web elements with attributes that change with page refresh.
- Attribute may contain a static part followed by a dynamic part.

- Using the "contains" Function:
- Format: double forward slash for relative XPath, followed by the tag name in square brackets.
- Advantages: Specify any part of the attribute value (start, middle, end).

- Example:
- To locate input elements with the name attribute containing "user":

- Test Execution:
- The test opens the browser, types in the dummy email, and closes it, passing the test successfully.

- Conclusion:
- "Contains" function in XPath is valuable for locating dynamic web elements.
- It allows specifying partial attribute values to identify desired elements.
- Combining "contains" with "starts-with" can enhance automation framework efficiency.

manoj_mafiosi
Автор

MASHALLAH SUPER EXPLAIN. THANKS A LOT

zahidukalayev
Автор

amazing explanation, ,Thank you so much sir

sufails
Автор

Thank you sir. I will share to help out :)

safaboi
Автор

Hi Sir, Thank you so much for such an amazing idea about robot,
I have started writing script using robot framework, I was lagging on occurs, i'm very new to handle this exception so please upload a video about Handling exception on pycharm

sunandabamnalli
Автор

Hi Sir, If the value is variable type then how could we find with the contains function. '(//div[contains(text(), value)])'
Here in my program "value" is not constant.Everytime i need to take value from for loop. Please let me know how to find text value if it is in variable mode

harikag
Автор

how to find an xath with text using contains

rkrk
join shbcf.ru