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.

Use of cell/textbox

Good morning,

I'm kinda of new to the use of Sahi and despite my intensive researches I couldn't find out what am I doing wrong.

I've got the following GUI element that I wish to fill, then I'll loop to the following ones using rightOf and the other relatives coordinates.

<input name="BUCCO_OCC_001_BUCCO_DT_ACTE" class="INPUNN" value="" maxlength="8" size="8" onchange="checkOnChangeV2(this, 0, 8, /^[0-3][0-9][0-1][0-9][0-9][0-9][0-9][0-9]$|^(9){8}$|^-$/, '99999999', 0,'date JJMMAAAA');changeQuantite(this);record(this);copyLastValue('BUCCO',1, 'BUCCO_DT_ACTE');" onblur="checkOnBlur(this);" onfocus="this.onKeyPress=checkOnKeyPress;checkOnFocus(this);" onkeyup="checkOnKeyUpV2(event, this, 0, 8, /^[0-3][0-9][0-1][0-9][0-9][0-9][0-9][0-9]$|^(9){8}$|^-$/, '99999999', 0, 'date JJMMAAAA');" onkeypress="return checkOnKeyPress(event);" type="TEXT">

I've tried the following syntaxes, but only the first one is working. My problem is that my form is composed of mixes textbox, checkbox and select, so I'd need to use a generic _cell in order to create my loop.
_setValue(_textbox("BUCCO_OCC_001_BUCCO_DT_ACTE"), "01102014");
_setValue(_cell(0,"BUCCO_OCC_001_BUCCO_DT_ACTE"), "01102014");
_setValue(_cell("BUCCO_OCC_001_BUCCO_DT_ACTE"), "01102014");

How can I do it?

Answers

  • If I understand correctly, there are cells in which are the inputs?
    if yes, try accessing the inputs
    _cell($i).children[0]
    
    loop the $i and find out what kind of input you got

    this should work given the input is the first child

    Regards
    Wormi
Sign In or Register to comment.