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.

Problem using a script in another script

ellinorellinor Members
edited November -1 in Sahi - Open Source
I have a function in one script and want to use it in another script. I have tried to do like this:
_include("C:\\SahiScript\\Functions.sah");
where Functions.sah is the other script. This does not work, when i run the first script I get "--Stopped Playback: SUCCESS--" and no steps have been run.

When I viewthe script from within Sahi Controller the lines looks lika this:
_include(C:SahiScriptFunctions.sah);

/ellinor

Comments

  • StringyLowStringyLow Members
    edited September 2008
    Exclude the escaping whack.

    This should work:
    _include("C:\SahiScript\Functions.sah");

    Also, be sure to check the playback log via the "View Logs" link at the bottom of the Playback tab in the Sahi Controller.
  • narayannarayan Administrators
    edited September 2008
    You could use forward slashes without any problem:
    _include("C:/SahiScript/Functions.sah");

    It is surprising that you got the error in spite of escaping the back slash. Which version of Sahi are you using?
  • It works with the forward slashes, thanks for the help!
    I use the version that was available 31:st of July 2008 :)
Sign In or Register to comment.