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.
Writing test results into an Excel file
Following code;
was working fine (write "SUCCESS" value into excel sheet)when scripts was successfully run.
Issues is when the scripts get fail, it not writing anything into the excel sheet
here is the code;
$sets = _scriptStatus()
db.update("update [Sheet1$] set Results= '" + $sets + "' where TC_ID='001'");
was working fine (write "SUCCESS" value into excel sheet)when scripts was successfully run.
Issues is when the scripts get fail, it not writing anything into the excel sheet
here is the code;
$sets = _scriptStatus()
db.update("update [Sheet1$] set Results= '" + $sets + "' where TC_ID='001'");
This discussion has been closed.
Comments
If you want to write into excel sheet when the script is failed then you will have to use javascript try catch blocks.
For more Details:
http://sahi.co.in/w/exception-handling
Eg: You can try the below script on http://sahi.co.in/demo and creating an excel file in D folder.
Check if this helps you to solve your issue.
Regards
Sumitra
Thanks for the help, it's works.
One small thing, how can I write error message or error details into an Excel sheet when the test scripts got failed.
In catch(f),the f itself contains the error message.
You can now write these error message to the excel sheet.
Here is the example :
Hope this solves your issue.
Regards
Sumitra
Thanks for the help, it's works.