Interview Question: What are different types of locators in Selenium ?

What are different types of locators in Selenium ?

Ans- The different locators are :

By.id(), By.name(), By.tagName(), By.className(), By.linkText(), By.partialLinkText(), By.xpath, By.cssSelector().