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.

changing cell index

vijayvijay Members
edited November -1 in Sahi - Open Source
HI ,

There is Some problem with CELL number
below Are the Cells of the GRID
initially when i Created the Script Cell Numbers WERE [20] , [38] , [68] , [98] As u can see below

it gave Error the Next time I run the script

WHEN I CTRL + Hover OVER the cells the ;
the cell number changed to _cell("0[20]") TO _cell("0[29]")
For all the Cells The Index was changed

CODE ::

_popup("Create Plan")._click(_cell("0[20]"));

_popup("Create Plan")._click(_textbox("DisplayClientBudget[1]"), "100000");
_popup("Create Plan")._setValue(_textbox("DisplayClientBudget[1]"), "100000");


_popup("Create Plan")._click(_cell("0[38]"));
_popup("Create Plan")._setValue(_textbox("DisplayClientBudget[1]"), "100000");


_popup("Create Plan")._click(_cell("0[68]"));
_popup("Create Plan")._setValue(_textbox("DisplayClientBudget[1]"), "100000");


_popup("Create Plan")._click(_cell("0[98]"));
_popup("Create Plan")._setValue(_textbox("DisplayClientBudget[1]"), "200000");

Comments

  • Hi Vijay,

    The index of cell number depends upon their position on the page. If you will add or remove other elements, they will change.

    You can use the DOM relations to identify the cells in a better way. You may like to identify a cell near a text box or inside a div. Since these relations will not be changing, even if the index of the cell will change, Sahi scripts will work well.

    Regards,
    Vivek
  • Thanks A tons
Sign In or Register to comment.