Q
Q
Quaasaar2020-06-07 21:30:37
Python
Quaasaar, 2020-06-07 21:30:37

Python, Selenium, is it possible to pull localstorage?

I'm using chromedriver and I need to pull localstorage data from a certain page. Everything I tried to do is right. I found a piece of code: but I did not understand how to use it. Nothing happened, only the result "None", can you tell me what's wrong? driver.execute_script("window.localStorage;")

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
soremix, 2020-06-07
@SoreMix

localstorage = driver.execute_script("return window.localStorage;")

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question