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.

How to use the Regular expression in my case.

PriyaPriya Members
edited November -1 in Sahi - Open Source
Hi all,
Can anyone help me........
I want to access the text from a particular cell
Ex:_cell("groupUsersForm:j_id174:0:j_id175")
_cell("groupUsersForm:j_id174:1:j_id175")
_cell("groupUsersForm:j_id174:2:j_id175")
_cell("groupUsersForm:j_id174:3:j_id175")

The numbers 174 and 175 keeps on changing .

I have tried with the below code,but its not working.
var $x;
_set($x,_getText(_cell(/groupUsersForm:j_id/+/:0:/)));
_alert($x);

Comments

  • see if this works
    _set($x,_getText(_cell(/groupUsersForm:j_id\d*:0:/))); //if the number can be of any number of digits
    _set($x,_getText(_cell(/groupUsersForm:j_id\d{3}:0:/))); //if the number is always of 3 digits

    Regards,
    pankaj.
  • Thanks Pankaj....

    works fine
    thank you..
Sign In or Register to comment.