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.

Setting a Value of _cell

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

I have the following issue:

When "spying" on a table in the system, I get:
prefix: popup("w_subone")
_cell("ctl00xContentPlaceHolderxSysContainerxDisplayTab1xSysListEditor1xGrid_rc_0_5")

When using _setValue:
popup("w_subone")._setValue(_cell("ctl00xContentPlaceHolderxSysContainerxDisplayTab1xSysListEditor1xGrid_rc_0_5")) this fails. I guess _setValue does not work on _cell

So I have tried the following:
_popup("w_subone")._setValue(_cell("ctl00xContentPlaceHolderxSysContainer1xSysContainerTab1xSysListEditor1xGrid_rc_0_4").innerHTML = 1);
This amazing shows the data in the cell, but after saving the record and viewing it, it disappears

Is there any solution on this.
I have been looking on forums with people with similar issues, but there was no luck
I also tried recording the steps, but the expression doesn't show in recorded steps.

Unfortunately this program is in development and there is no outside link, or access to coding

Comments

  • narayannarayan Administrators
    Hi Reinhart,

    I believe you are not identifying the correct element. A cell is not an element which takes input. If it looks like a textbox, try with
    _popup("w_subone")._setValue(_textbox(0, _in(_cell("ctl00xContentPlaceHolderxSysContainerxDisplayTab1xSysListEditor1xGrid_rc_0_5"))), "abcd")
    

    Regards,
    Narayan
  • Hi,

    Thank you for your response.
    Unfortunately it failed. It states, that _in was not found on browser

    Any other suggestions, or correction?
  • Hi,

    I also Tested the following:

    _popup("w_subone")._setValue(_textbox(0, _in(_popup('subone")._cell("ctl00xContentPlaceHolderxSysContainerxDisplayTab1xSysListEditor1xGrid_rc_0_5"))), "abcd");

    _popup("w_subone")._setValue(_textbox(0, _near(_popup('subone")._cell("ctl00xContentPlaceHolderxSysContainerxDisplayTab1xSysListEditor1xGrid_rc_0_5"))), "abcd");

    Hope this help.
  • Hi,

    Did you possibly found a solution regarding this issue.

    Thank you
  • Hi,

    Will you please reply to this post!
    We are paying for support, but are not getting any response from SAHI.

    Thank you
  • If you are paying for support, I guess you should write an email directly to the sahi support.
  • Will do thank you
  • Thank you solved the issue!
  • and the solution is?
  • The there is another container within the cell, but it only gets exposed when the user clicks on it.

    The solution was just to click on it, and then using CTRL spy the object inside the cell, which is a textbox with completely different naming.

    so in the script you just _click the _cell
    and then _setValue the _Textbox

    Thank you Vivek
This discussion has been closed.