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.
_set not working
Hi,
OS - WinXP SP3
Browser - IE8
Sahi version - 3.5
I want to assign a variable with return value of function call, but:
_set($DriveLetter_Global, GetSAHIRootDir());
is not working. The function GetSAHIRootDir() is returning "C" correctly. But if I print DriveLetter_Global, its showing "null". I tried changing the lines to:
_set($DriveLetter_Global, _call(GetSAHIRootDir()));
But this doesn't seems to work.
Can you please suggest any alternative?
OS - WinXP SP3
Browser - IE8
Sahi version - 3.5
I want to assign a variable with return value of function call, but:
_set($DriveLetter_Global, GetSAHIRootDir());
is not working. The function GetSAHIRootDir() is returning "C" correctly. But if I print DriveLetter_Global, its showing "null". I tried changing the lines to:
_set($DriveLetter_Global, _call(GetSAHIRootDir()));
But this doesn't seems to work.
Can you please suggest any alternative?
Comments
Use $DriveLetter_Global in printing the value.
If it still doesn't work, please also post your function GetSAHIRootDir.
Cheers.
did you try
I had tried, but not working. However now its working. I don't know waht could be the dependencies. I haven't changed anything.
I'm first checking whether sahi tool exist in the system
I'm pasting the .sah file here(with output in comment):
Due to _set() failing, IsSahi_tool_Exists() is being called with "null", and the code is exiting
Please help me find what could be problem.
I think you should put GetSAHIRootDir() in _call(), since the function is inside the <browser> tag just like what you did in IsSahi_tool_Exists() when you called it, .
Its not working...