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 store different url in a single variable
I'm using a for loop in my script.
I've to store a url onto a variable that i will use in the script later.
So is there any process that i can use a single variable for storing all those url.
I've to store a url onto a variable that i will use in the script later.
So is there any process that i can use a single variable for storing all those url.
This discussion has been closed.
Comments
you could store them in an array... in your loop use: _set(urls[$i], document.location.href) or you use urls.push(document.location.href)
Regards
Wormi
I'm not getting it correctly.
I'm taking the link for the one cycle by the following:-
$code=_getText(_link("stubcode"));
then I've to navigate to it after wards:
_navigateTo($code, true);
Now I need a way that this code variable become an array so that in the loop I can call like
For ex:-
$code[$i]=_getText(_link("stubcode"));
_navigateTo($code[$k], true);
Now it is working.