How to find whether button is disabled or not in Selenium IDE

Sree picture Sree · Feb 18, 2013 · Viewed 56.4k times · Source

I want to check whether button is disabled or not by selenium IDE But I couldn't. I have tried below code but it doesn't work. is there any other way to find whether button is disabled...? <tr><td>assertElementPresent</td><td>
//button[contains(text(), 'Save')]</td><td>/td></tr>

Answer

Code Enthusiastic picture Code Enthusiastic · Feb 18, 2013

In WebDriver. There is a method isEnabled which returns true if the element is enabled else it returns false.

driver.findElement(By.id("elementID")).isEnabled();