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 a variable inside ""
Hi,
any hint how to fix the following example?
var $i=1;
while ($i<10) {
$i++;
_click(_link("$i"));
}
Such that it will run as "_click(_link("1"));" and not "_click(_link("$i"));"?
thanks,
James Tan
any hint how to fix the following example?
var $i=1;
while ($i<10) {
$i++;
_click(_link("$i"));
}
Such that it will run as "_click(_link("1"));" and not "_click(_link("$i"));"?
thanks,
James Tan
Comments
You can convert an int to string by adding to a blank string. Then it will correctly come up as "1".
Regards,
Narayan
thanks again for the hint and code example.
thanks,
James Tan