18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
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 function _getText effectively?
Hi,
I am trying to gt text from the application using _getText function.
Example :
$val=_getText(_link("_displayAvailabilityID"));
_debug($val);
The result I am gettig is _debug(_getText(_link("_displayAvailabilityID"));
);
I am expecting the actual text availabe on the link i am passing.
How can i get the value in the variable $val?
Thanks!!
I am trying to gt text from the application using _getText function.
Example :
$val=_getText(_link("_displayAvailabilityID"));
_debug($val);
The result I am gettig is _debug(_getText(_link("_displayAvailabilityID"));
);
I am expecting the actual text availabe on the link i am passing.
How can i get the value in the variable $val?
Thanks!!
Comments
Try this
$val=_getText(_link("/.*displayAvailabilityID/"));
_debug($val);
cause here i am using same kind of structure for getText in my framework and script and its working fine. Difference is that one only.....so just check it out...it might help.
Are you using an older version of Sahi? If yes, try picking the latest.
If you do not want to move away from the older version, you could use
Regards,
Narayan