1 Answer

0 votes
by
WebDriver facilitates the user with the following methods to check the visibility of the web elements. These web elements can be buttons, drop boxes, checkboxes, radio buttons, labels etc.

isDisplayed()

boolean elePresent = driver.findElement(By.xpath("xpath")).isDisplayed();

1

boolean elePresent = driver.findElement(By.xpath("xpath")).isDisplayed();

isSelected()

boolean eleSelected= driver.findElement(By.xpath("xpath")).isSelected();

1

boolean eleSelected= driver.findElement(By.xpath("xpath")).isSelected();

isEnabled()

boolean eleEnabled= driver.findElement(By.xpath("xpath")).isEnabled();

1

boolean eleEnabled= driver.findElement(By.xpath("xpath")).isEnabled();

Related questions

0 votes
asked Aug 22, 2019 in Selenium by john ganales
0 votes
asked Aug 22, 2019 in Selenium by john ganales
...