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.
_include inside a function
Hi,
Is it possible to use _include inside a function?
'Cause when i tried, it doesn't work.
Thanks and regards.
Is it possible to use _include inside a function?
'Cause when i tried, it doesn't work.
Thanks and regards.
Comments
_include expands the script in place, before the execution starts. It is a simple string substitution. If your function and included file are well formed it will work correctly. You can look at the "Parsed Script" link on the Controller Playback tab to see how the include works.
That said, it is better to have includes at the top of a script. Let us say A includes B. Then instead of including B conditionally inside a function, include B at the top of A, but keep the code in B inside functions and then call the functions at the appropriate places in A.
Hope that helps.
Regards,
Narayan
Right. Got it.
One more thing.
I think, _include doesn't read a variable?
I have my code like this:
Thanks and regards.
The variable is empty.. or it might be more valid to say, that it isn't even recognized as a variable.
Regards,
Narayan
I fully understand _include now.