CSS Locators from A to Z | Theory + Practice | Example in Java and Python

Опубликовано: 15 Март 2026
на канале: БАГОИСКАТЕЛЬНИЦА
224
14

Hi! This video is perfect for those new to automated testing, those just getting started with CSS locators, or those who use them infrequently and are unsure about them. In the video, I break down CSS locators from scratch: what they are, why they're needed, and how to write them correctly. Without complex theory or fancy terminology, just what you really need to get started.

In the second part, I jump straight into practice. I search for elements and write CSS locators in Java on a real website, and then show a similar example in Python. I discuss common mistakes, useful techniques, and explain how to make locators stable and readable so that automated tests don't crash with every layout change.

Links:
Cheat sheet for CSS locators and useful materials on my Telegram channel: https://t.me/anya_bug_hunter

Java autotest project: https://github.com/anya-bug-hunter/ja...
Python autotest project: https://github.com/anya-bug-hunter/py...

Lesson 1:    • Как написать первый UI автотест на Seleniu...  

Free course:    • Курс "Теория тестирования"  

HTML: https://developer.mozilla.org/ru/docs...

Timecodes:
00:00 - Introduction
01:15 - Basic Selectors
04:12 - Attributes
06:32 - Hierarchy
10:36 - Pseudo-Classes
13:32 - Writing an Automated Test
28:25 - Example Automated Test in Python
29:02 - Final Thoughts