This course will help you to find and optimize XPATH and CSS locators for your automation tests
☑ Students will learn how to build flexible, precise and stable XPATH and CSS locators for Selenium, Katalon, Appium and other test automation tools where XPATH/CSS locators are used
☑ How to use Chrome Dev tools
☑ How to search by text, XPATH axes, child, other elements
☑ How to search by CSS locators by attributes, partial values, how to find and verify locators
☑ Which type of locator is the most powerful
About me
My name is Ostap I have more than 12 years of experience in test automation. I have prepared a short but well-structured and informative course about XPATH, and CSS locators. It will be helpful for beginner and developing test automation engineers who want to use stable and optimal locators for their tests. If you work with web or mobile applications – you know that finding a good and stable locator can cost you a lot of time and effort and even that does not guarantee that the locator will work after some changes in DOM. This course will help you to understand and get some experience working with locators.
You will find answers to the following questions:
– what is a locator?
– why do we need locators?
– what is the difference between XPATH and CSS?
– how to find and verify locators?
– how to use Dev Tools?
– how to use Dev Tools console to find XPATH and css locators?
– how to use the features and functions of XPATH?
– how to build locators using XPATH, CSS and other types of locators?
– how to find and optimize locators for complex elements
– how to search elements by text, partial text
– how to search using logical operators?
– how to search elements by children, ancestors, what is XPATH axis?
– why the relative path is better than the absolute?
English
Language
Introduction
Introduction
Locators and their types
What are the locators and why do we need them ?
How to find locators
Practice
Terminology. DOM
Absolute path
Relative path and task
PDF version
XPATH basics, operators
XPATH agenda and intro
Search by attribute
Arrays
Attributes, contain and practice
Search by text
Search by text + arrays
Attribute starts-with. Practice
Answer for practice task
Using text() and starts-with
Logical operators: AND
Logical operators: OR
XPATH axes
Axes: following::
Axes: following:: part 2
Axes: preceding::
Axes: ancestor::
Axes: child::
Axes: following-sibling
Axes: parent::
Axes: self::
Axes: descendant::
Practice on XPATH axes
Other helpful functions and practice
PDF version
CSS locators
CSS locators, search by name and attribute
Search by attribute value
Search by class and ID
Selecting multiple elements
Search child elements
Search for next and proceeding elements
Search by part of an attribute
Search by starts with / ends with
Search by first child and last child
Search nth-child
Search by first and last of type
Search by nth of type, type vs child
Bonus: DevTools additional features
PDF version