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 verify a listitem is enabled or not?
_assertFalse(_listitem("Location").disabled);
_assertTrue((!_listitem("Location").disabled);
for enabled listitem.But for both sahi script is not able to verify the listitem that its not disabled.
Please if anyone faced the same problem and have the solution.
Thanks
Sujata
_assertTrue((!_listitem("Location").disabled);
for enabled listitem.But for both sahi script is not able to verify the listitem that its not disabled.
Please if anyone faced the same problem and have the solution.
Thanks
Sujata
Best Answers
-
Hi Sujata,
If thats not working, check out the element color property using _style. For enabled and disabled the color properties are different.
Ex: _style(_listitem("Location"),"color"); for disabled might be equal to rgb(128, 128, 128); and for enabled it might be rgb(256, 256, 256);
This can be one of the way of verifying disabled property.
Regards,
Bhavitha
Answers