18 January 2026:


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

lonely_girl01lonely_girl01 Members
edited July 2013 in Sahi Pro
Hi,

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 lonely_girl01,
    What error message are you getting the 2nd time?

    Regards.
  • edited July 2013 Answer ✓
    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

  • lonely_girl01lonely_girl01 Members
    edited July 2013
    I have resolved this.
    Since, _set() is still in Sahi library functions, i just added _set in the normal_functionalities.txt
  • lonely_girl01lonely_girl01 Members
    edited July 2013
    It's weird.
    It's not working again, after some series of test with the solution i did...

  • lonely_girl01lonely_girl01 Members
    edited July 2013
    Hi Pratyush,

    Still the same error,
    _sahi.setServerVar('\$urlHost', getUrlHost()); ReferenceError: getUrlHost is not defined
    

    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.
Sign In or Register to comment.