[Django]-Python Selenium Local Storage returns None

3👍

Yes, you have to return from the JS script in order to see the value at the Python level:

print(self.selenium.execute_script('return localStorage.getItem("token");'))
👤alecxe

Leave a comment