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.

Readonly property for textarea

arunbalaarunbala Members
edited November -1 in Sahi - Open Source
Hello there,
i just want to check, whether the textarea is in readonly mode or not. I have tried with your scripts but it is not working.

here is your script
1. _assertTrue(_textarea("name").readonly);

2. _assert(_textarea("name").className.indexOf("disabled") != -1);

In the second script it throws the value but its not correct.

Comments

  • Any one can help me on this
  • Did you get any solution for that. I am having the same issue.

    I tried the first one but could not able to validate the read only text box-

    _assertTrue(_textarea("Enter_the_Reason").readonly);

    Other assertions for this text field are -

    _assertExists(_textarea("Enter_the_Reason"));
    _assert(_isVisible(_textarea("Enter_the_Reason")));
    _assertEqual("", _getValue(_textarea("Enter_the_Reason")));

    Regards,
    Gyanadeep
  • Hi arunbala, gyannadeep,
    Which version of Sahi are you using?
    Please try it out with the latest released Sahi OS version i.e. 4.4.
    If the problem continues to persist, please let me know.
  • this works,

    _set($disableEnable, ""+ _textbox("telephone").disabled);

    value set in $disableEnable will be a string.
Sign In or Register to comment.