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.
Newby Please Please help: storing a text in a variale
I will try to explain:
I have a word displayed on a webpage, I want to store this word in a variable and then paste it in another text field?
Can someone please help me?
Thanks,
~Fortex
I have a word displayed on a webpage, I want to store this word in a variable and then paste it in another text field?
Can someone please help me?
Thanks,
~Fortex
Comments
Heres' an example.. hope this helps... i will extract the text displayed as link on this page (your login name displayed as a hyperlink) and save it in a variable.
Now you can use $txt to set the same text anywhere required.
Regards,
Pankaj.
Would it be possible to assign a value to a variable like this:
var $txt = _getText(_link("Fortex"));
edit:
I just saw this on the site.
"Use _set to store a variable with data from browser"
But can anyone still leave feedback for my question, as in will it work or not.
For page dependent variables you need to use _set() otherwise the variable value will disappear as you navigate away from the page.
So I think directly assigning the value here won't work.
Regards,
Pankaj.