Testing button state using JWebUnit

326 Views Asked by At

Is it possible to test if a button is enabled or disabled(even if it is enabled/disabled using java script after few form actions) in the page using JWebUnit.

1

There are 1 best solutions below

0
user1307037 On

If you can get the element (button) by xpath locator strategy then you can use "getElementAttributeByXPath(String xpath, String attribute)" This will allow you to check the attribute of the object which will be enabled/disabled