How can you find if an element in displayed on the screen using Selenium?

WebDriver facilitates the user with the following methods to check the visibility of the web elements. These web elements can be buttons, dropdown, checkboxes, radio buttons, labels etc.

  • isDisplayed()
  • isSelected()
  • isEnabled()


boolean buttonPresence = driver.findElement("")).isDisplayed();
boolean buttonSelected = driver.findElement("")).isSelected();
boolean searchIconEnabled = driver.findElement("")).isEnabled();