Selenium WebDriver - How to check if a button is enabled on the page ?
Selenium WebDriver Interview question and Answers
(Continued from previous question...)
Selenium WebDriver - How to check if a button is enabled on the page ?
Use isEnabled() method. The return type of the method is boolean. So if it return true then button is enabled else not enabled.
driver.findElement(By.xpath("xpath of button")).isEnabled();
1
driver.findElement(By.xpath("xpath of button")).isEnabled();
(Continued on next question...)
Other Interview Questions
|