DEV Community

55TFSI
55TFSI

Posted on

Selenium 1

Different between
.isDisplayed() and .isEnabled()


.isDisplayed() is to confirm a WebElement shown or not, That is, for instance, a WebElement is written in a webPage but the visibility is false. Then .isDisplayed() will return false.
But if you use isEnable() even if the visibility is false, but the webElement is physically exists so the isEnable() Will return True.

This part I am not sure, need to be confirmed,
isEnable() is to check the editable status of an element, if it is editable return true else return false.

Summary:
A WebElement that is 1. exists 2. not visible
isDisplayed() return false.
isEnable return true.

Top comments (0)