If I load a number of web pages in my browser I see a number local and/or session storage variables in the Developer Tools.
But when I call this command on one of their keys:
driver.execute_script(“return sessionStorage.getItem(‘#{key}’)”)
it doesn’t return anything.
But if I do
driver.execute_script(“return localStorage.key(0)”) it successfully returns the key of one of the variables.
If I do:
driver.execute_script(“return localStorage.key(1)”) it returns nothing, even though I can see in my browser there are more local storage variables.
So it seems strongly that not all the storage variables are there, in the webdriver.
Do you think so?
Can you provide an example of retrieving all session storage variables, and not just some?
Thanks very much,
Julius