Styrow.dev
Question 5 of 64

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:

  1. ID

  2. ClassName

  3. Name

  4. TagName

  5. LinkText

  6. PartialLinkText

  7. Xpath

  8. CSS Selector