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.
Calling/Creating Custom Global Functions
From reading and researching through the forum I wanted to make sure that I understand correctly regarding creating custom global functions and calling them.
1) To create custom global functions, I would need to add it to c:\sahi\htdocs\spr\extensions.js. Is this the only location that I may add global custom functions? Can I have multiple .js files for differentiate between components, i.e. search.js, reports.js, etc.
2) To call the global functions I need to include it in my script, i.e.
would it be:
_include("extensions.sah"); or
_include("lib.sah"); or
Thank you.
Kai
1) To create custom global functions, I would need to add it to c:\sahi\htdocs\spr\extensions.js. Is this the only location that I may add global custom functions? Can I have multiple .js files for differentiate between components, i.e. search.js, reports.js, etc.
2) To call the global functions I need to include it in my script, i.e.
would it be:
_include("extensions.sah"); or
_include("lib.sah"); or
Thank you.
Kai
Comments
**
* Copyright 2006 V Narayan Raman
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// you may add your custom global functions here
// uncomment line which includes extensions.js in config/inject_top.txt