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.
copy the values from results screen and place into spread sheet
chandu4244
Members
Hi Narayan,
I need a help. to copy the values from results screen and place into spread sheet.
means i have done with sending the input values from spread sheet. once the execution is completed i will get status in web browser (in specific column) i want to copy that status and place into spread sheet.
is there any way to do it?
Thanks & Regards,
Chandu
I need a help. to copy the values from results screen and place into spread sheet.
means i have done with sending the input values from spread sheet. once the execution is completed i will get status in web browser (in specific column) i want to copy that status and place into spread sheet.
is there any way to do it?
Thanks & Regards,
Chandu
Comments
Are you unable to get the status or unable to write to excel?
Regards,
Narayan
Scenario is
i have one valid user name and password. here i am trying to automate for user name and password.
Initialy i passed invalid user name and password click on submit button. Here i am getting some message (java script message not in popup). So i want to capture that message from application and past into excel sheet using automation.
i dont have access to connect DATABASE.
if the above scenario is unable to perform then can we do it from database connection. If yes could you please let me know.
Kindly help me here.
Thanks & Regards,
Chandu
find the below code
_setValue(_textbox("PortletHandler\$Portlet29\$PartNumTextBox"), "testwds23");
_setValue(_textbox("PortletHandler\$Portlet29\$ItemDescTextBox"), "dsf");
observ above script "portlet29" once if we logged into the application this values is getting increased so for that i have written follwing script
for (var $i=29; $i<100; $i++)
{
var $temp = "PortletHandler" + "\\$portlet" + $i + "\\$TransTypeDropdown";
_alert($temp);
var $test = $temp;
_setSelected(_select($test), "INSPECTION");
here i am facing the problem
upto alert it returns correct values but while setting up this values in "_setSelected" it was not working
expected values is
"PortletHandler\$Portlet29\$TransTypeDropdown"
actual values is
"PortletHandler\\$Portlet29\\$TransTypeDropdown"
\\ is for escape character...
please guide me here it was very important for me.....
You no longer need to escape $ with backslash. You can just use
var $temp = "PortletHandler" + "$portlet" + $i + "$TransTypeDropdown";
The $ escaping has been around for historical reasons. Thanks for bringing it to notice. We will remove the escape during record too.
Regards,
Narayan
Let me check and let you know once.
Still we are placing the same problem
Actual:
_setSelected(_select("UpdRptr\$ctl00\$PNTaskCtl\$ReasonRemovedDropDown"), "WORN");
Here i have to increase $ct100 so i have written following script
for(var $i=0;$i<$task.length;$i++)
{
var $ctrl = 100 + $i;
//var $x = "UpdRptr" + "\" + "$ct" + $ctrl + "\" + "$PNTaskCtl" + "\" + "$ReasonRemovedDropDown";
//_alert($x);
//_setSelected(_select($x), $ReasonRemovedDropDown);
_setSelected(_select("UpdRptr\$ct" + $ctrl + "\$PNTaskCtl\$InstallPNLstCtl\$LstMainListBox"), $LstMainListBox);
}
tried with multiple ways using forward slash also..
still i am unable to execute this script.
Please give me the solution to me.
Thanks,
Chandu Dendukuri
"UpdRptr$ct" + $ctrl + "$PNTaskCtl$ReasonRemovedDropDown"
Btw, what you have specified as actual, and what you have in your loop are different. Could that be the mistake?
_setSelected(_select("UpdRptr$ct" + 100+ "$PNTaskCtl$ReasonRemovedDropDown"), "FAILURE");
TypeError: Cannot read property 'options' of undefined
TypeError: Cannot read property 'options' of undefined
at [object Object]._setSelected (http://test30.campsystems.com/_s_/spr/concat.js:1225:12)
at [object Object]. (eval at (http://test30.campsystems.com/_s_/spr/concat.js:3011:14))
at [object Object].ex (http://test30.campsystems.com/_s_/spr/concat.js:3011:9)
at unknown source
Click for browser script
at Component (scripts/CAMP3O_Demo1.sah:28)
at ReadComponent (scripts/CAMP3O_Demo1.sah:110) at Sep 21, 2011 3:29:13 PM
SCRIPT:
for(var $i=0;$i<$task.length;$i++)
{
var $ctr = 100 + $i;
//var $x = "UpdRptr" + "\" + "$ct" + $ctrl + "\" + "$PNTaskCtl" + "\" + "$ReasonRemovedDropDown";
//_alert($x);
_setSelected(_select("UpdRptr$ct" + $ctr+ "$PNTaskCtl$ReasonRemovedDropDown"), $ReasonRemovedDropDown);
_setSelected(_select("UpdRptr\$ct" + $ctrl + "\$PNTaskCtl\$InstallPNLstCtl\$LstMainListBox"), $LstMainListBox);
}
While recording i am getting following script:
_setSelected(_select("UpdRptr\$ctl00\$PNTaskCtl\$ReasonRemovedDropDown"), "WORN");
Can you check if it is $ctl00 or $ct100 in the below script:
_setSelected(_select("UpdRptr\$ctl00\$PNTaskCtl\$ReasonRemovedDropDown"), "WORN");
OR
_setSelected(_select("UpdRptr\$ct100\$PNTaskCtl\$ReasonRemovedDropDown"), "WORN");
Regards
Sumitra
Actually it was
$Ct100 (in the application) while recording it was converted into
$CTl00.
If you want me to call to your desk or want me to discuss through mails for fast communication please let me know.
Thanks,
Chandu Dendukuri.
For the below script:
_setSelected(_select("UpdRptr\$ctl00\$PNTaskCtl\$ReasonRemovedDropDown"), "WORN");
You could use:
var $ctr = "l" + "0" + $i;
Check if this helps.
Regards
Sumitra