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.
Problem using a script in another script
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
_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
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.
_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?
I use the version that was available 31:st of July 2008