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.

When have SSO applied, how to change user in sahi?

limi2limi2 Members
edited November 2013 in Sahi - Open Source
Hi,

My test object has applied SSO(Single Sign On), which means once I logged in as user A, system would never ask me to log in again even if I open a new window.
But in certain cases, I need to change user within one test flow (e.g. user A created some test data, but there is a "cross-check" procedure, which requires user B to complete remaining steps).
Does anybody know how I can handle this in sahi?

Thanks in advance!
Michelle

Best Answer

  • When SSO is cookie related, delete the cookie.
    I guess this depends on how your SSO works. Why don't just log off user A?

Answers

  • Hello globalworming,

    Thanks for your comment!
    Actually my problem is that the application has no "log off" function for some reason.
    Then I've tried to clear cookies by both using "_deleteCookie()" and the clear recent history function provided by FireFox, found cookies can not be cleared if the browse is opened by Sahi. I found other posts about clear cookies issue in this forum and they raised one solution for Chrome, which is to start chrome with --incognito. Since I must use FireFox to test, do you know any solutions to clear cookies in FireFox?
  • no idea. if _deleteCookie does not work you can try some javascript solutions http://stackoverflow.com/questions/5976912/clear-cookies-using-javascript
  • Hi limi,
    For firefox, please try the following steps:
    1) Open sahi_pro/config/ff_profile_template/pref.js
    2) Add the following line in the end of the file:
    user_pref("browser.privatebrowsing.autostart",true);
    3) Save the file and restart Sahi.

    This should now work for you.

    Regards,
    Pratyush
Sign In or Register to comment.