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.

_setHttpHeader

TSheeleyTSheeley Members
edited May 2013 in Sahi - Open Source
Can anyone give me some help with this?

I'm attempting to use this api, but always get : "ERROR ReferenceError: "_setHttpHeader" is not defined." I thought this was one of the "default" miscellaneous api's? I want to be able to modify these so that I am able to switch between them. My code:

var $loc_1 = "135:127:88:80:3:1"; // LOCATIONLEVELS for Modify Headers
var $loc_2 = "230:114:86:79:3:1"; // LOCATIONLEVELS for Modify Headers

var $mac_1 = "00045f8AC599"; // MACADDRESS for Modify Headers
var $mac_2 = "00045f891543"; // MACADDRESS for Modify Headers

_setHttpHeader("MACADDRESS", $mac_1);
_setHttpHeader("locationlevels", $loc_1);

_navigateTo("http://<url_1>";);

_assert(<Something that proves successful navigation>);

_setHttpHeader("MACADDRESS", $mac_2);
_setHttpHeader("locationlevels", $loc_2);

_navigateTo("http://<url_2>";);

_assert(<Something that proves successful navigation>);

I can NEVER get _setHttpHeader to work without the above error? Is this working is Sahi OS?

Thanks in advance

Best Answer

  • edited June 2013 Answer ✓
    Hi TSheeley,
    Unfortunately, _setHttpHeader is not exposed in Sahi OS.

    Regards
    Pratyush Jha,
    Tyto Software

Answers

  • Hi Pratyush,

    Thanks for this. Anyway I could do this without _setHttpHeader?
Sign In or Register to comment.