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.

disabled element

tpdietztpdietz Members
edited November -1 in Sahi - Open Source
I have a textbox that is disabled. I would like to verify that it is disabled via Sahi, but I don't know how to do that yet.

Can anyone point me in the right direction?


Thanks,

Tim

Comments

  • narayannarayan Administrators
    _assertTrue(_textbox("identifier").disabled);
    
    where identifier can be
    1) id
    2) name
    3) index in the form

    You could also do
    _assertTrue(document.formName.textboxName.disabled);
    
    I see that the recorder does not record for disabled elements. Will fix it in a future release.
  • Thanks, that works great.

    So, can I assume that Sahi supports most DOM properties like that?
  • narayannarayan Administrators
    Yes. The script runs as javascript. So it has access to whatever javascript has access to.
Sign In or Register to comment.