In this post i will show you the difference between isDisplayed() and isEnabled()
After Executing code :
isDisplayed
boolean isDisplayed()
Is this element displayed or not? This method avoids the problem of having to parse an element's "style" attribute.
- Returns:
- Whether or not the element is displayed
- Method used to verify presence of a web element within the webpage. The method is designed to result a Boolean value with each success and failure. The method returns a “true” value if the specified web element is present on the web page and a “false” value if the web element is not present on the web page.
isEnabled
boolean isEnabled()
Is the element currently enabled or not? This will generally return true for everything but disabled input elements.
- Returns:
- True if the element is enabled, false otherwise.
- Reference : https://selenium.googlecode.com/svn/trunk/docs/api/java/org/openqa/selenium/WebElement.html#isEnabled()
After Executing code :
Below is the Code:
Thanks A lot for the Amazing Article Got The Difference Between IsDisplayed and IsEnabled Methods
ReplyDelete
ReplyDeleteاسعار ارقام نقل عفش بالرياض