18 January 2026:


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 write the results to the excel file from Sahi logs

sharibabusharibabu Members
edited November -1 in Sahi - Open Source
Can any one tell me how we can perform the following tasks in Sahi functional testing tool:-

1. How do we sequentially call one script after another in a Master script?

2. How to parameterize the data (or) how to read different data from an excel/word/text files?

3. How to write the results to the excel file from Sahi logs in more presentable way?

Comments

  • dpdp Members
    For Q1, you can use the _include API. Refer http://sahi.co.in/w/_include
    For example, let us say, you have 3 scripts: s1.sah, s2.sah and testMain.sah and you wish to call s1 and s2 from testMain, then testMain.sah may look like follows:

    //testMain.sah

    _include("s1.sah");
    _include("s2.sah");


    For Q2:
    Refer the following pages to know how to read data from excel and then use them in a sahi script
    http://sahi.co.in/w/working-with-excel-sheets
    http://sahi.co.in/w/_getdb

    Use the _readFile API to read data from a csv file.
    Refer http://sahi.co.in/w/_readfile

    I have not come across a scenario where I have to read data from a Word document, so can't help you on that

    Q3 is very subjective in the sense I did get what you meant by "more presentable way". Any way, you can use the _getDB API to write data to an excel sheet as if writing data to a database table. But IMHO it is better to stick to the default log itself where ever possible. You can even write your own messages to the log with color coding using the _log API (http://sahi.co.in/w/_log)
Sign In or Register to comment.