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.

Sahi and HTTP_REFERER on IE

dpdp Members
edited April 2009 in Sahi - Open Source
Hi,

I am relatively new to Sahi. I am facing problem while playing back scripts using IE on an ASP page where the ASP uses the following statement

referer = Request.ServerVariables["HTTP_REFERER"].Trim().ToLower();

The error says that 'Request.ServerVariables["HTTP_REFERER"]' returns null. And upon experimentation, I found that, on IE, while executing Sahi script, HTTP_REFERER is set to null where as HTTP_REFERER is set to the url while manually performing the action.

The same Sahi script works fine with Firefox

I am using Sahi V2 Release 2009-03-04.

I would greatly appreciate if any of you could direct me to any work-around or quick fix for this behavior

Thanks in advance
dp

Comments

  • narayannarayan Administrators
    Checking this...
  • dpdp Members
    I think the problem is that, from IE4 onwards, due to security reasons, IE does not set HTTP_REFERER if the page is navigated from JavaScript. Details are available here: support.microsoft.com/kb/178066 (I am not allowed to post the full link since i am a new member)

    I tried to click on the link from IE which points to the proxy and it works fine. But when the script is played back, it fails. This lead to my above conclusion. Hope this helps to arrive at a solution

    dp
  • narayannarayan Administrators
    dp, thanks for the information. I will check and see how this can be made to work.

    Regards,
    Narayan
  • dpdp Members
    Thanks in advance
Sign In or Register to comment.