What is a locator? Name the different types of locators in Selenium?

A locator is an address that uniquely identifies a web element within a web page. Selenium has several different types of locators to identify web elements in web pages. These include: 

  1. ID
  2. Name
  3. ClassName
  4. TagName
  5. LinkText
  6. PartialLinkText
  7. XPath
  8. CSS Selector
  9. DOM