I need to retrieve a session after logout for a next test. Therefor I’m trying to get the state (or state.token) from local storage and write in to a Project Parameter. I use “retrieve item xy from local storage”.
My problem is, that I don’t get the value (which must be the whole object “state”) in my Project Parameter. The field remains empty and it looks like its capable to store simple values only?
Some help or hints would be appreciated. I’m pretty much stuck
Hi @Andrew
If you want to get all session storage and not just the value of the key you can use the action execute JavaScript and execute this commend - return window.sessionStorage;
I tried the JavaScript command, respectively adapted it slightly: return window.localStorage.getItem(‘state’);
This seems to extract the whole local storage - good so far. But in the following (separated) test I try to retrieve the data with “Set value for item in local storage” but there’s no current value in the project parameter (EMPTY).
I was able to retrieve and set local storage within the same test. But not retrieve it in one test and set it in the next test.