WiSdOm - Selenium Locators

Опубликовано: 21 Май 2026
на канале: WiSdOm - Vision for Learning
456
33

Selenium Locators

To create GUI reference Selenium introduced Locators.
Selenium provides a two different categories of Locators to precisely locate a GUI element
Attribute based Locators
Structure based locators

Attribute based Locators
HTML ID - First choice of identification
Name - If ID not there then select the name
Class name - Third option is the class name
LinkText - For hyperlinks
Partial LinkText - For hyperlinks
Tag Name - Use this for group of elements

Structure based locators
Rely on the structure of the page
Xpath & CSS

Xpath (Expression/Syntax - Address of a particular element)
Absolute X Path – Complete address of an element
Relative XPath – Shortest identical address


Please subscribe to our channel WiSdOm for more videos…
Have a nice day…..!!!!!