Skip to content
UdemySeleniumPaid courseAll LevelsCertificate

XPath and CSS Locators for Test Automation (Udemy.com)

Build stable XPath and CSS selectors using DevTools for Selenium, Playwright, and modern web apps

Created by: Dmitry Shyshkin

Last updated January 2026

icon
What you will learn

  • Build stable and readable XPath and CSS locators for test automation
  • Locate complex and dynamic web elements using advanced XPath techniques
  • Write clean CSS selectors and understand when to use CSS vs XPath
  • Debug, fix, and improve broken or flaky locators using Chrome DevTools

How it compares

Against the other 108 rated Udemy courses in Selenium on CourseDuck:

  • Rating4.6 out of 5higher than 79% of them
  • Reviews4,990#12 of 109 by number of reviews
  • Length4.7 hoursshorter than 74% of them
  • Last updatedJanuary 2026more recently than 78% of them

icon
Course Description

XPath and CSS locators are the core skills behind reliable UI test automation. Flaky tests, unstable selectors, and “element not found” errors almost always come from poor locator strategy.

In this course, you’ll learn how to build stable XPath and CSS locators for real web applications using Chrome DevTools. The focus is practical: how to read the DOM, understand element relationships, and create selectors that work in Selenium, Playwright, and modern automation frameworks.

You’ll start with locator fundamentals and quickly move into real XPath and CSS patterns used in production test automation:

  • XPath syntax, predicates, and relative paths

  • XPath functions like text(), contains(), starts-with(), and not()

  • XPath axes for locating elements relative to other elements

  • CSS selectors, attribute matching, combinators, and pseudo-classes

  • XPath vs CSS: when to use each and why

  • Debugging and fixing broken locators in DevTools

This course avoids auto-generated selectors and teaches you how to design clean, readable, and maintainable locators that survive UI changes. Every XPath and CSS selector is tested directly in the browser before being used in automation.

Who this course is for:

  • QA engineers, SDETs, and test automation engineers

  • Selenium and Playwright users

  • Developers writing or reviewing UI tests

  • Anyone struggling with flaky tests caused by bad locators

By the end of the course, you’ll be able to read any DOM, choose the right locator strategy, and write reliable XPath and CSS selectors with confidence.

icon
Udemy Discount

The discount is applied through our link. Open the course from here and Udemy's current promotional price is applied at checkout on most courses, no code to type.

Some courses are excluded from Udemy's promotions. If the price does not drop, clear your browser cookies and use the button again.

icon
Instructor Details

Dmitry Shyshkin

Hi, I’m Dmitry Shyshkin, a test automation architect and educator with over 15 years of real-world experience in automation engineering.

I currently work as a Principal Software Development Engineer in Test, where I design and maintain scalable automation frameworks for complex web, API, and end-to-end systems. My background is strongly hands-on and architecture-focused—everything I teach is based on how automation works in real companies, not simplified demos.

I’ve been teaching on Udemy since 2018 and have helped 100,000+ students across 9 in-depth courses covering Selenium, RESTAssured, Java, Python, XPath, and modern test automation practices. My courses are structured, practical, and designed to give you skills you can apply immediately at work.

I continuously update my content to reflect current tools, best practices, and industry expectations, so you’re learning approaches that are relevant today—not outdated theory.

Whether you’re starting your automation journey or looking to level up professionally, my goal is to help you build confidence and strong, real-world automation skills.

icon
More courses by Dmitry Shyshkin

$89.99

$10.99

$11.99

$12.99

$69.99

$19.99

icon
More Selenium courses

$84.99

$79.99

$84.99

$59.99

$74.99

$11.99

icon
Reviews

4.6

4,990 ratings on Udemy

Select a bar to show only those reviews.Select the bar again to show every rating.

By Sara Bartha on 11/14/2020

It was a very interesting course, I have learned a lot. Dimitry explains everything very nicely so I can easily understand them.

By Aremu Ayo on 11/7/2020

easy to understand and it is applicable

By Jemma McCreesh on 11/7/2020

Very good explanations and demonstrations throughout.

By Csaba Hari on 11/7/2020

Greatly explained everything to know about xpaths in a very short amount of time. If you want to learn everything to know about xpaths in 3 hours this is the course for you.

By Greigh MacMichael on 11/7/2020

I wish the resources had some notes, although I did make my own on the way.

By Naeem Akram on 10/25/2020

This is a good course about a very specific topic. I like it.

By Ashwin Bala on 10/18/2020

Very clear and simple

By Tomasz Weiss on 10/16/2020

Zainteresowa mnie. Dobra jako nagrania. :)

By Dmitry Vlasenka on 9/26/2020

This is awesome. The giving information is so valuable. The structure and teaching style is convenient and easy to get properly. 100 % recomend.

By Pavan on 9/23/2020

It is really good and understood all the concepts very quickly

By Brigitta van Rensburg on 9/18/2020

I really enjoyed the course it was very insightful. Just check your videos as some start off very blury at the beginning of each course. Thank you.

By Lucky Jain on 9/7/2020

Thank you so much. Course was good :)

Showing 12 of 150 reviews

icon
Quality Score

No CourseDuck member has rated this course yet. Taken it? Give each part a thumbs up or down.

Content Quality
/
Video Quality
/
Qualified Instructor
/
Course Pace
/
Course Depth & Coverage
/

Overall Score : 92 / 100