Dynamic XPath in Selenium WebDriver – Part 2: Advanced Functions & Axes Explained

preview_player
Показать описание
In this advanced XPath tutorial (Part 2), you'll master dynamic XPath creation in Selenium WebDriver using powerful functions and axes. We’ll explore how to use contains(), starts-with(), and text() for flexible element matching, along with XPath axes like following, preceding, and ancestor for navigating complex DOM structures. You’ll also learn the key differences between absolute and relative XPath and when to use each effectively. These concepts will significantly improve your ability to locate dynamic elements and write stable, maintainable Selenium scripts.

Get in-depth automation tutorials and personalized notes at:

For more valuable and exclusive learnings on automation visit:

Contact Mukesh Otwani at:

Mukesh Otwani Social Media Handles:

Read Our Latest Blogs On Automation:

Generative AI-based Test Automation Tool - TestRigor:

Playwright with Java: Complete Web & API Automation Framework Series:

QA & Tech Essentials: Career, Tools, and Quick Tips:

Playwright With JavaScript Tutorials - From Basic To Advanced:

About Mukesh Otwani and Test Automation:
Hi, I’m Mukesh Otwani, A passionate working professional based in the vibrant city of Bangalore, India. This channel is dedicated to helping manual testers and aspiring QA professionals transition smoothly into the world of automation testing. With years of hands-on experience, I share practical and beginner-friendly tutorials covering a wide range of tools and technologies including Selenium WebDriver, TestNG, Maven, Appium, Sikuli, AutoIT, Jenkins, Git, GitHub, RPA, Playwright, and more. Whether you're starting your automation journey or looking to upgrade your skills with real-world project insights and framework development, you’re in the right place. Subscribe and join a growing community of learners committed to mastering automation and staying ahead in the ever-evolving tech industry.

Get Exclusive & Premium Automation Courses Here 👉 -

🔍All Affiliate and Partnership Links :

Keywords:
dynamic xpath selenium, selenium xpath functions, xpath contains selenium, starts-with xpath, text() xpath function, xpath axes selenium, xpath following preceding, ancestor xpath, absolute vs relative xpath, xpath selenium tutorial

Hashtags:
#Selenium #XPath #WebDriver #TestAutomation #DynamicXPath #QA #AutomationTesting #SoftwareTesting #XPathFunctions #XPathAxes
Рекомендации по теме
Комментарии
Автор

Why didn't i find your channel before! Your videos are so helpful. Really appreciate the effort you have put in to make the tutorials so easy to follow. Thanks!

snehasingh
Автор

thanks mukesh, u did a great job, hats off!!

gandharavkatyal
Автор

Thanks for this video...learned so much from it :)

madhusmita
Автор

Thanks Mukesh....Many Questions get answered....

kirantherise
Автор

Thanks a lot for the way of explaining is simply share the link of part 3 of this video series

swayambikash
Автор

Thank you so much for nice tutorials ....

Shashikala.gowda
Автор

Hi Mukesh,
Excellent videos mate!!! Great

harshbhasin
Автор

This video helped me a lot. Thank you so much..

madhurichebbi
Автор

Thank you bro...realy nice tutorial..!

ashokgunja
Автор

Hi mukesh,
at 5:09 I noticed that using following::a is showing element which are written before element having id='menu-dashboard' as well(as u can notice scroll bar position). Then how following:: is showing only elements coming after id='menu-dashboard' element?

AmreshKumar-ngrs
Автор

nice video, please post video tutorial on "Selenium Grid". Thanks! :)

shreyanshjain
Автор

Nice video Mukesh...
One clarification, for every element on a page if possible we can create multiple relative xpath.am I right?

hariprasad
Автор

Sir, can you explain why there is a dot before every xpath expression in firefox ?, eg .//* .cant we not give directly // and then the expression ?In real time if we write on any ide like eclipse, how do we write it ?

sohamchakraborty
Автор

Hello Sir,
Element should have been "select" but was "span" , what should i do.there is only class which is not working when created Dynamic xpath

jayantiborde
Автор

Hi, latest version of firefox doesn't support firebug or firepath, since we use developer tools to inspect elements, can u please provide details on how to work on developers tools .

Backfire
Автор

sir i am working on salesforce technology, my website has developed on cloud, and it's a very tricky site, all elements having only single locator and i.e., class, or either id, i am not able to do automation, i have tried with so many xpath but none of them working, i am fadup now.

varsharawat
Автор

Mukesh you are using //following:: but as per the syntax we should use /following:: and even i have used with /following and its working

srinuckograndstreet
Автор

Hi, Mukesh
Can you please help with Error communicating with the remote browser. It may have died. error?

ketakinaik
Автор

Nice explanation Sir thank you then without using fire bug how we use these following, ancestor, preceding Sir can you make video for that?

rajeshdevan
Автор

Hi Mukesh what is the normalize-space please check this xpath //a[normalize-space()='Create a new account'] i m not understand this

TravelExplorerNX
welcome to shbcf.ru