18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
How to test the status of a button
Hi all,
In my application, I want to test if a button is enabled or disabled (greyed out).
Could anybody tell me which function should I use ?
Thanks in advance.
Lou10120
In my application, I want to test if a button is enabled or disabled (greyed out).
Could anybody tell me which function should I use ?
Thanks in advance.
Lou10120
Comments
if (_button("Example").disabled == true) {
_alert("The button is disabled");
}
You'll get a lot more mileage out of Sahi if you understand how the HTML DOM works:
http://www.w3schools.com/htmldom/dom_reference.asp
http://www.w3schools.com/jsref/default.asp
Good luck and keep the questions coming!
I call the functions like
I wasn't aware there was a "isDisabled" property.
Thanks Donna!