What are the different types of locators in Selenium?
Question
What are the different types of locators in Selenium?
Answer
The locator is used to identify a web element uniquely within the webpage. Thus, to identify web elements, we have different types of locators in Selenium:
-
ID
-
ClassName
-
Name
-
TagName
-
LinkText
-
PartialLinkText
-
Xpath
-
CSS Selector