ISTQB Cấp độ Cơ bản (CTFL) V4.0 + Bài thi Thực hành - 2025
Maged Koshty
XPath and CSS Locators for Test Automation
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.
Khám phá thêm các khoá học cùng chủ đề
Maged Koshty
Rahul Shetty Academy
Tigran Ter-Karapetyants
Tigran Ter-Karapetyants
Rahul Shetty Academy
Bryan Lamb
Tigran Ter-Karapetyants
Andrii Piatakha
Victor Gorinov
Raghav Pal
Rahul Arora
Lucky Trainings