Categories

1 Answer

Aug 22, 2019
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();
Click here to read more about Selenium
Click here to read more about Insurance

Related questions

Madanswer
Aug 22, 2019 in Selenium
Aug 19, 2019 in Selenium
Aug 22, 2019 in Selenium
...