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.
ReferenceError: _set is not defined
Hi,
I just checked the latest version of Sahi, V5.0.5
It seems that _set is not working?
I have browser script,
This is working on the lower version that I am currently using, V.4.3.2
Sahi log report error:
I just checked the latest version of Sahi, V5.0.5
It seems that _set is not working?
I have browser script,
<browser>
function getUrlHost() {
return window.location.host;
}
</browser>
and used the function using _set,
_set($urlHost, getUrlHost())
This is working on the lower version that I am currently using, V.4.3.2
Sahi log report error:
_sahi.setServerVar('\$urlHost', getUrlHost()); ReferenceError: getUrlHost is not defined
Best Answers
-
Hi Charmaine,
Thanks for bringing this problem to our notice.
The problem you are referring to has been fixed in the newer build. It will be released and available very soon.
If you need it urgently, please send a query at support@sahi.co.in.
Regards.
Answers
Since, _set() is still in Sahi library functions, i just added _set in the normal_functionalities.txt
It's not working again, after some series of test with the solution i did...
Still the same error,
It seems that, the behavior is, after running 1-3 tests successfully, it will not work. Then, i have to wait (for minutes or hours), for it to work again.