If I am testing the disabled state of a button with an id="pingBtn" in the HTML page, use the is_editable API and check the disabled state.
API doc:
$sel->is_editable($locator)Compare the return value to false (0) to check the disabled state and add a comment which will be printed on the test console.
Determines whether the specified input element is editable, ie hasn't been disabled.This method will fail if the specified element isn't an input element.
$locator is an element locator
Returns true if the input element is editable, false otherwise
ok($sel->is_editable("pingBtn") == 0, "is_not_editable, pingBtn");
No comments:
Post a Comment