Skip to content Skip to sidebar Skip to footer

Python And Selenium - Reboot Program And Reuse Same Browser Session

Scenario: I am working an an auto whatsapp responder using whatsapp web. I log in via chromedriver on selenium with python 3. I run a function that does some stuff inside a while T

Solution 1:

Whatsapp stores session in localStorage of the browser.

You can extract the localStorage and save to a file on closing of a session.

Upon instantiating a session check if this file exists, then parse the file and update localStorage with saved values before opening a URL.

Post a Comment for "Python And Selenium - Reboot Program And Reuse Same Browser Session"