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.

Check ReadOnly Span

hartzhartz Members
edited November -1 in Sahi - Open Source
I have a table in the page with a column that can be readOnly or editable. The html tag for the column is :

<td class="GridRowStyle" align="left">
<input name="ctl00$ctl00$MasterContent$MainContent$125d51af707345cd9803e3e0fa364bef$ctl05$9b08869412b54070a16736efb15feaca" type="text" value="4" id="ctl00_ctl00_MasterContent_MainContent_125d51af707345cd9803e3e0fa364bef_ctl05_9b08869412b54070a16736efb15feaca" style="display:none;" />
<span id="ctl00_ctl00_MasterContent_MainContent_125d51af707345cd9803e3e0fa364bef_ctl05_9b08869412b54070a16736efb15feacaLabel">4</span>
</td>

I need to check whether the column is readOnly when the page loads. I have tried and got errors:

_assert(_cell("4").readonly); [Assertion Failed.]
_assert(_span("4").readonly); [Assertion Failed.]
_assert(_textbox("4").readonly); [Unable to get value of property 'readonly':object is null or undefined]

Is there any way I can check if this column is readOnly? Am I putting the correct values into the assert check?

Thank you in advance.
Sign In or Register to comment.