The locator is an address that identifies a web element within the page. Different types of locators are used to identify different web elements accurately in Selenium:

  • ID
  • ClassName
  • Name
  • TagName
  • LinkText
  • PartialLinkText
  • Xpath
  • CSS Selector
  • DOM
BY Best Interview Question ON 26 Jan 2019