-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there a way to catch payload and response/visualization of token of a request? #518
Comments
Hi @Luccanjm, like an oauth token for example? Although I think some folks have managed to get at tokens when using WebDriver, And users would never see a token. A user would simply login and the browser would handle any tokens for them. Maybe if you describe your use case more we can figure something out. |
Hi @lread , thanks for reply. I need a authtoken(access-token), when I do login there is a request that returns with response the access-token and firebase-access-token, I need them. I used the function get-requests but it don't return the "response" that I need, just header response. I know webdriver it's not the best way to catch this token, but was my first attempt and I think the easier, so if I could catch this with webdriver would be perfect. |
@Luccanjm So you need these tokens because you want to use them to make requests outside of your WebDriver browser sessions? If we come up with something, my feeling is that it will be on the awkward side. Idea 1: If the token location is known, fetch via injected JavaScriptIf you know where the token is stored, you can sometimes fetch it via JavaScript. For example, apparently, Firebase stores its token in an IndexedDB. WebDriver provides a facility to inject JavaScript which Etaoin exposes like so. So you could inject some JavaScript to return the token. Idea 2: Login outside of WebDriverUse regular HTTP requests to login outside a WebDriver session. Idea 3: Experiment with snooping on traffic more.If you are using Chrome, maybe you will be able to see what you need to see. Idea 4: Use the WebDriver session web browser proxy to snoop on trafficYou can setup a proxy and then snoop via that. I think this one has typically been the Selenium WebDriver team recommendation for this kind of thing. |
I will see those ideas!! Thanks for the tips :) |
I need to take the token that a request return, I didn't find a way, is there a way to this?
The text was updated successfully, but these errors were encountered: