Mastering Selectors/ Locators for Automation Testing! (Udemy.com)
Master XPath, CSS selectors and more! - A core skill for Selenium Webdriver and all other forms of automation testing!
Created by: Gianni Bruno
Last updated August 2026
What you will learn
- Understand XPath and CSS Selectors in detail
- The different types of of XPath and CSS Selectors
- Full understand how to construct XPath and CSS Selector when there is no unique attribute available
- How XPath and CSS Selectors are used in Selenium
- The different types of methods available with XPath and CSS Selectors
- The differences between CSS and XPath selectors
Course Description
Selectors/ locators is at the heart of automation testing. Learning how to identify them (without relying on tools) is a critical skill to becoming an automation tester.
Locators in Selenium, Cypress, WebdriverIO... can be referred to as one of the most critical components required to build effective and robust automaton tests, in turn making your tests become allot less Flaky. Its ideally the building block of all automation tests / scripts. It helps locate the GUI elements through which multiple user actions can be performed. These are one of the important parameters for scripting, and if they end up to be incorrect or brittle, they may lead to script failure. A good scripting base foundation requires elements to be located appropriately
Tools cannot be relied upon, as they do not often provide the most efficient selector/ locator available. Identifying selectors/ locators is also a common question asked in coding exercise during interviews.
This course teaches you:
How to identify selectors/ locators like a pro
Understand the difference between the different types of locators
The best approach to identify them
How to write your own custom locators
How to prepare for interview questions relating to selectors/ locators
How to gain confidence in writing selectors/ locators so you do not need to rely on tools
And more
By the end of this course you will be able to confidently identify and write your own custom locators without needing to rely on tools. This will provide you with the confidence and knowledge to write high quality Selenium test scripts.
Come master this core skill, today!
Instructor Details
- 4.4 Rating
354 Reviews
Gianni Bruno
I'm a Senior SDET with 10+ years of hands-on experience building test automation frameworks across real-world teams, products and projects. I've also helped over 100,000 students, with 12,500+ reviews, learn test automation through practical Udemy courses built around real tools, real projects and job-ready skills.
I've worked across digital asset custody, blockchain-related systems, fintech, edtech, online booking, e-commerce and hospitality/POS systems. That includes testing web applications, APIs, financial workflows, backend services, reporting systems and business-critical end-to-end journeys where accuracy, reliability and data integrity matter.
My courses cover:
- Playwright, TypeScript and AI-assisted testing
- Claude, OpenAI and modern QA workflows
- API testing with Postman and REST
- Selenium WebDriver, Java and Cypress
- WebDriverIO, JavaScript and Python
More courses by Gianni Bruno
The Complete Cypress v13 Course- Automation Testing Bootcamp (2025)
4.5 (2,566 Reviews)
Provider: Udemy
Time: 36h
$84.99
Selenium WebDriver 4, Cucumber BDD, Java & More! (2025)
4.7 (2,145 Reviews)
Provider: Udemy
Time: 10.1h
$84.99
The Complete WebdriverIO Course- Automation Testing Bootcamp (2026)
4.4 (1,898 Reviews)
Provider: Udemy
Time: 14.7h
$10.99
Master Generative AI for Software Testing: Manual to Auto (2026)
4.5 (1,162 Reviews)
Provider: Udemy
Time: 11.6h
$84.99
API Testing in detail using Postman - Test Automation (2026)
4.8 (423 Reviews)
Provider: Udemy
Time: 7.8h
$10.99
Playwright with Cucumber BDD & TypeScript - Beginner to Pro (2026)
4.6 (314 Reviews)
Provider: Udemy
Time: 15.3h
$79.99
More Software Testing courses
ZeroToHero TestNG Framework - From Basics to Advanced (2026)
4.9 (828 Reviews)
Provider: Udemy
Time: 6.2h
$59.99
Selenium WebDriver with Java- Basics to Advanced + Framework (2026)
4.9 (620 Reviews)
Provider: Udemy
Time: 35.5h
$84.99
Karate DSL: API Automation and Performance from Zero to Hero (2026)
4.8 (4,652 Reviews)
Provider: Udemy
Time: 7.2h
$10.99
API Testing in detail using Postman - Test Automation (2026)
4.8 (423 Reviews)
Provider: Udemy
Time: 7.8h
$10.99
Quick Introduction to Postman and API Testing for Beginners (2025)
4.7 (23,113 Reviews)
Provider: Udemy
Time: 3.2h
$13.99
Software Testing Masterclass (2026) - From Novice to Expert
4.7 (12,622 Reviews)
Provider: Udemy
Time: 9.9h
$149.99
Reviews
By Nilesh Wadge on 3/31/2026
All locators should have been covered in this course. name, tagname, classname, link text and partial link text are missing.
By Gonzalo Molina on 12/5/2025
I already knew quite a bit about selectors before starting this course, but it helped me a lot to reinforce some things I wasn’t completely clear about, especially regarding certain selectors and some tips that help me find the target element. Once again, this is the third or fourth course I’ve taken with Gianni, and I’m once more grateful for a very good course and an excellent explanation of this topic.
By Giuseppe Privitera on 11/26/2025
This course was very helpful because I learned how to use CSS and XPath selectors to implement them on various frameworks like Selenium WebDriver, RobotFramework, Cypress, etc. Furthermore, the instructor explained the topics clearly and concisely with practical examples. I recommend this fantastic course for anyone wanting to pursue a career as an Automation Tester.
By Hassan Salem on 6/17/2025
it was very good but also I think we need to add more content specially when it come to xpath function as an example get elemnt between to elemnt or before an elemnt xpath can go in both direction but here we only cover one direction but generally for a beginner the course was perfect
By Jacqueline George on 1/19/2024
I always struggled with my selectors but this training course has made me feel pretty confident. I would recommend this to newbies (I wish this had been around when I started 5 years ago) and for people like myself who are stuck in a rut with their selectors. The course is well paced and and there are quizzes throughout to test your knowledge. Awesome training. Would highly recommend.
By Ramsey Rimkeit on 6/8/2023
A great introduction to CSS Selectors and Xpath. The instructor does a great job explaining the topic and gives great examples. However, it wasn't very helpful for me because it was too basic. I use Xpath in my daily work so almost all of this was just a review of what I already know. I would have appreciated some more advanced Xpath functions, etc.
By Gian Ferre E. Puse on 11/19/2022
This is very comprehensible and concise, easy to follow, loved the little quizzes. I just wished there were more advanced exercises or challenges, nonetheless, the course has nice pacing that covers the essential concepts. This will definitely help in making you more well-equipped and efficient in test automation.
By Aleksandrina Angelova on 4/1/2022
I really enjoyed the content of the course and it definitely helped me understanding Selectors / Locators. However I wish there were more complex examples like locating elements from different websites that don't many IDs. Also some best practices examples would be a great addition to the course.
By Dzmitry P on 2/23/2022
Basic theory here. This course is good for those who would like to get only(!) basic understanding of CSS/xPath selectors - no tricky cases or similar to this e.g. dynamic selectors, tables and many-many more. If you have purchased any automation course where "selectors" topic is covered, then you won't find here something new for yourself. UPD: Hi Gianni. Thanks for your answer. Definitely 'contains' can be used in a different way etc. You know this, I know this nevertheless there are a lot of people who don't know it and hence it would be nice to cover as many cases as possible. Especially those examples which are based on your experience and real life examples. BR, Dmitry
By Darrick Wilson on 3/20/2021
Excellent! Gianni Bruno `2021 - Mastering Selectors/Locators for Automation Testing!` is a must for automation testers. This course provides; a selectors test website, pdf downloads, and easy to understand lessons on css and xpath locators. Instructor Gianni Bruno is an excellent instructor. I highly recommend!
Quality Score
No CourseDuck member has rated this course yet. Taken it? Give each part a thumbs up or down.
Overall Score : 88 / 100











