I am running a UI test on the webpage that uses google oauth2 for login (Gmail address as username). My problem is that I need to login with multiple different users during the same test, but after the first logout, pressing login again automatically logs in the previous user. Does not happen when I manually try to login/logout.
I'm assuming this is because during test run auth token is still active and google logs in automatically.
Things I have tried so far:
1) - importing google-auth-library and run GoogleAuth.disconnect() -> returns error: disconnect is not a function.
2) - How to reset google oauth 2.0 authorization? - import 'googleapis' and run gapi.auth.setToken(null) - gapi.auth has no such option.
Can't try revokeAccess functions suggested since I don't know the token value.
Is there a way for me to retrieve login token from my test (I'm guessing it would be from client side) so that I could set it to null/delete it?