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 capture data from a browser and export to excel
OS Name - Windows 7
Browser Name and version - IE 8.0
Sahi Build (Available on Sahi controller's Info tab)- (Build: 2011-05-25)
I want to capture the below information displayed in the application export the information to excel
Dropdown 'City' - this will list Chennai, Mumbai, Delhi etc..
Current Count - 100
Assigned Count - 50
Unassigned Count - 50
The counts will be displayed as a display only text field in the application.
Is it possible to automate to capture the counts for the cities one by one and export the same to the excel
Thanks,
Vatsan
Browser Name and version - IE 8.0
Sahi Build (Available on Sahi controller's Info tab)- (Build: 2011-05-25)
I want to capture the below information displayed in the application export the information to excel
Dropdown 'City' - this will list Chennai, Mumbai, Delhi etc..
Current Count - 100
Assigned Count - 50
Unassigned Count - 50
The counts will be displayed as a display only text field in the application.
Is it possible to automate to capture the counts for the cities one by one and export the same to the excel
Thanks,
Vatsan
This discussion has been closed.
Comments
I'm also looking a solution exactly similar to the scenario mentioned by Murugan.
In my application there is one dropdown called Showroom where many showrooms will be listed ( e.g . Chennai, Delhi, Bangalore etc)
User can select the Showroom be selecting the value from the dropdown , then the following will be listed in the page as per the showoom value selected.
Total No.of. Customers : 100
No.of. Members : 50
No. of. Leads: 50
Can we automate the above scenario by writing a function to capture the counts displayed in a page and export the same to excel sheet
Please help
Thanks
yes we can automate the scenario
if you can send me the link where that drop down options exist i can provide a code for you folks
Regards,
Siva
Im not able to view the posts replied by Sumitra ...i was able to see that post couple of mins back..
can you please post that again.
Thanks
You can try with the following code:
Let me know if this solves your issue.
Regards
Sumitra
Thanks for replying. The CSV file is not getting created using the script below. please refer the same and let me know your thoughts.
function selectshowroom($sr){
_click(_select(0));
_setSelected(_select(0),$sr);
//_setSelected(_select("ctl00\$MainContent\$ddlShowRoom"), $sr);
}
var $values = ["Akron", "Albany", "Chicago"];
var $dataToWrite = new Array();
var $data1;
{
selectshowroom($values $i);
_alert(_getText(_span("MainContent_lblCurrentLeadCount")));
$dataToWrite i = new Array();
getDetails($values i, $dataToWrite i);
}
function getDetails($cityName, $data)
{
_alert("before _SetSelected");
_setSelected(_select("ctl00\$MainContent\$ddlShowRoom"), $cityName);
_alert("before Data asign");
$data[0] = _getText(_span("MainContent_lblCurrentLeadCount"));
$data[1] = _getText(_span("MainContent_lblAssigned"));
$data[2] = _getText(_span("MainContent_lblUnassigned"));
_alert("After Data asign");
_alert($data[0] + $data[1] + $data[2] );
$data1 = $data[0] + "," + $data[1] + "," + $data[2];
}
_alert("before csv write");
_alert($dataToWrite[0] + " \n" + $dataToWrite[1] + "\n" +$dataToWrite[2]);
_alert($data1);
var $data = [ [2, 3, 5], [1, 2, 4], [4, 3, 7] ];
_writeCSVFile($data , "D:\Test\ex.csv", true, ",");
_alert("After csv write");
Will keep posting.