How will you find an element using Selenium?

In Selenium every object or control in a web page is referred as an elements, there are different locators to find an element in a web page they are:

  • ID
  • Name
  • Tag
  • Attribute
  • CSS
  • Linktext
  • PartialLink Text
  • Xpath etc

You can use findElement() to find single element and findElements() method to find multiple elements in Selenium.