I’ve successfully done the extracting of access_token from login API and passing to another POST method API.In the same way, how to extract access_token from browser local storage and use it later?
First ideea i have now is … you have to inspect with devtoools how the api request is hanled by the browser.
Usualy the tokens received are stored in a cookie, so grabbing the cookie and re-use it later may work … if the token won’t expire
You can execute any JS code that you want with selenium. Give this a try:
From there, it’s as simple as assigning the value to a global variable, like this:
GlobalVariable.myVariable = itemFromStorage;
Thanks, now it’s working.