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.
_dynamicinclude problem - Bug ?
Hello All,
I am facing a problem when using _dynamicinclude API. It’s a bit complicated for me to explain. Hope I have written it in an understandable manner.
SAHI Version : V4.3, Open Source.
Build: 2013-02-06.
System OS: Windows8
Browser: FireFox 20.
Issue is like explained below.
I have three set of sahi files, abc.sah, pqr.sah and xyz.sah
In xyz.sah, I have declared variables (declared like $first=’’; , $second=’’; , etc….) which are used in all three files but values for these variables are generated and set in abc.sah
Steps of working.
1. Abc.sah is called first. In this file, there are few conditions (if statements) which are written within a function. In each condition, a unique value will be generated and set into variables.
2. After values are set into variables, _dynamicinclude is called to include pqr.sah. _dynamicinclude is called in each if condition so that each time a unique value is generated, it will get set into variables and made available in pqr.sah.
example:
function asdfg(){
If(condition)
{
$first = New value generated and set into variable.
_dynamicinclude(pqr.sah);
_debug($first);
}
else if(condition)
{
$first = New value generated and set into variable.
_dynamicinclude(pqr.sah);
_debug($first);
}
}
In first if condition, everything works fine. In second else if condition, unique value generated in first if condition is still shown. When I debugged value of variable ($first), it shows values to have changed in each condition. But, with _dynamicinclude, the values generated in else if condition is not available in pqr.sah
Observation: Seems a file cannot be included twice using _dynamicinclude() at different locations.
All the above was working perfectly with _include statements.
I hope issue is clear. Any help on this will be great.
Regards,
Sreekanth.
I am facing a problem when using _dynamicinclude API. It’s a bit complicated for me to explain. Hope I have written it in an understandable manner.
SAHI Version : V4.3, Open Source.
Build: 2013-02-06.
System OS: Windows8
Browser: FireFox 20.
Issue is like explained below.
I have three set of sahi files, abc.sah, pqr.sah and xyz.sah
In xyz.sah, I have declared variables (declared like $first=’’; , $second=’’; , etc….) which are used in all three files but values for these variables are generated and set in abc.sah
Steps of working.
1. Abc.sah is called first. In this file, there are few conditions (if statements) which are written within a function. In each condition, a unique value will be generated and set into variables.
2. After values are set into variables, _dynamicinclude is called to include pqr.sah. _dynamicinclude is called in each if condition so that each time a unique value is generated, it will get set into variables and made available in pqr.sah.
example:
function asdfg(){
If(condition)
{
$first = New value generated and set into variable.
_dynamicinclude(pqr.sah);
_debug($first);
}
else if(condition)
{
$first = New value generated and set into variable.
_dynamicinclude(pqr.sah);
_debug($first);
}
}
In first if condition, everything works fine. In second else if condition, unique value generated in first if condition is still shown. When I debugged value of variable ($first), it shows values to have changed in each condition. But, with _dynamicinclude, the values generated in else if condition is not available in pqr.sah
Observation: Seems a file cannot be included twice using _dynamicinclude() at different locations.
All the above was working perfectly with _include statements.
I hope issue is clear. Any help on this will be great.
Regards,
Sreekanth.
Answers