18 January 2026:


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 check for disabled elements with Java API

sebboudreausebboudreau Members
edited November -1 in Sahi - Open Source
Hi,

I'm evaluating Sahi and so far, I'm impressed. We use the java driver and there is only one requirement (and it is important) that I cannot test:

I need to check that a button (and other types of html elements) is disabled.

Is there a way to achieve this using the java api? I know that I could do it with _assertTrue(_textbox("identifier").disabled); if I was using the native sahi controller.

Thanks for your help!

Comments

  • narayannarayan Administrators
    Hi,

    Use
    assertEquals("true", browser.textbox("identifier").fetch("disabled"));
    

    Regards,
    Narayan
  • Thank for your quick reply. it worked!
This discussion has been closed.