I'm using Selenium in Python with Firefox browser.
I want to save cookies and localStorage between each Selenium sessions. I first tried start Firefox using specified Profile. But it reports me:
DeprecationWarning: Setting a profile has been deprecated. Please use the set_preference and install_addons methods
So I believe there are something replacement that do the same thing for me.
The website I'm working on use cookies and localStorage to keep its session. I searched about how to read and write cookies, and I luckily got some useful codes. But I haven't find out anything useful for localStorage.
Some posts suggest me use execute_script to read / write localStorage. But it looks like that I had to open the website first so I can run execute_script on it. But the website require correct localStorage configured to load correctly. Or in the other word, I need set localStorage before the website get loaded.
So is there any way I can keep localStorage between each Selenium sessions?