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.

If a script has only _include API, could it be executed?

abby988abby988 Members
edited November -1 in Sahi - Open Source
I have writen a script(ChargeGroup. sah)like below:

_include("includes/Create_ChargeGroup.sah");
_include("includes/Modify_ChargeGroup.sah");
_include("includes/Remove_ChargeGroup.sah");

But when I playback above script, it failed with below info:
--Stopped Playback: FAILURE--

So I wonder if a script only contains "include API" could not be executed?
And for this case, the solution is to write two include API to the third one, right?

Comments

  • Hi abby988,

    The path can be absolute file path or a path relative to the file where the script is included.So it should be:

    _include("C:/basepath/includesdir/common_functions.sah"); OR

    _include("../../includesdir/trainingKeyValue.sah");

    Regards
    Sumitra
  • Hi abby

    as far as i know, when there is code to execute in a file, it will execute when included. What error message do you get when you examine the logfile?
  • Hi Sumitra,

    You're right. The script executed fail because data file path is not correct. So now I change it from relative path to absolute file path. Work Now. :)
    Thanks!

    Regards,
    Abby
  • Hi globalworming,

    Now it works well with data file path correction. It absolutely could work well with only include API in script.

    Thanks!
    Abby
This discussion has been closed.