Search code examples
javascriptjavaselenium-webdrivergigyaprotector

Gigya API keeps browser login details


I'm having issue in clearing logged in details. actually i'm running test suit where multiple test scenario are there. on each test scenario run i'm clearing the browser cookies and session related information by using await browser.executeScript('window.localStorage.clear();'); await browser.executeScript('window.sessionStorage.clear();'); await browser.driver.manage().deleteAllCookies(); and i checked that cookies and session are getting cleared after every scenario i run. but the things is it's not cleared the browser logging details which i enter the earlier. for an example i run the first test scenario in that i enter system logged in into the system but when it's got complete i cleared it out the all the stuff. but as soon as i start running second scenario it skipped the login step. did some research and somethings found that, user is logged in or not this status comes from GIGYA . when we clear down the cookies and cache from browser setting it will logged out the user

now i'm looking the solution is how to clear it out.


Solution

  • Gigya session relays in a cookie named glt_<API-KEY> - if that cookie get deleted, the session is lost, and the Gigya Web SDK won't be able to proxy calls to the Gigya API to perform actions such as updating the profile.

    The user data is not stored in any cookie, and therefore is not necessary to do that cleanup task, only the session token is stored in a cookie.