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.

Cookies being lost on redirect with V2

rksrks Members
edited February 2009 in Sahi - Open Source
Our application uses following mechanism for authentication:

1. Present login screen to user
2. User submits page with username and password.
3. Validate credentials on server, if valid then set an authentication cookie in response and redirect user to home page.

This use to work fine in earlier versions of sahi. I am trying to port scripts in V2 but it appears that cookies are being lost on redirect response.

Is anyone else facing similar issue?

thanks

Comments

  • I have tried to search the net for the possible problem and it looks like the HttpUrlConnection used is not sending the cookies properly back to the browser and so the problem happens.
  • narayannarayan Administrators
    rks,

    Can you use the latest unstable build (2009-02-27) and check if you still face that problem? https://sourceforge.net/project/showfiles.php?group_id=151639&package_id=309861&release_id=664444

    Regards,
    Narayan
  • Hi Narayan,

    I also faced the same issue while trying to port one of my scripts to sahiV2.
    Used the unstable build (2009-02-27) but the issue persists. Please suggest as we are looking forward to port our existing scripts to V2.

    Regards,
    Pankaj.
  • narayannarayan Administrators
    rks, Pankaj, Any example on the net where I can test this behavior?
  • Thanks Narayan. I tried the unstable build mentioned by you to implement a simple login process in which we are required to enter username and password and click login button. When I tried to run the script it runs fine and clicks the login button after setting the required values. But instead of navigating to the home page I was taken back to the login page.
    Instead of running the script I also tried to do the steps manually with proxy enabled but still I wasnt able to login.
    I also tried to replicate the same on gmail login page but couldnt succeed as it is an https one and throws certificate error. I am using Firefox 3.0.
    Will revert in case I get any page where you can check the issue. In the meanwhile please see if the provided information can assist in understanding the issue.

    Regards,
    Pankaj.
  • narayannarayan Administrators
    Guys, can you check on the just released V2 build and tell me if it works? Clear your browser cache before testing.
  • Hi,
    I tried the latest release but face the same problem.
    regards,
    pankaj.
  • narayannarayan Administrators
    Pankaj, thanks for the offline leads which helped me identify and fix the issue.


    rks, Pankaj,

    Here's the build which should work for you both.

    https://sourceforge.net/project/showfiles.php?group_id=151639&package_id=309861&release_id=667852

    If you confirm that this works for you, a stable release will follow in the next week.

    Regards,
    Narayan
  • Thanks Narayan. This is working for me :)

    Thanks and Regards,
    Pankaj.
This discussion has been closed.