vendredi 1 janvier 2021

Have a persistent browser configuration for multiple runs of a Selenium script

I have a web application test script which is written in Python using Selenium and the Firefox webdriver.

I would like to have my browser's configuration (especially cookies and localStorage) persisted across multiple runs of the script. I can use the firefox_profile with a path, but that clones the directory and does not write back changes it has made during the script runtime, the actual changes are only done within a temporary directory which is discarded after the driver exits.

Does a solution exist for my problem? I would prefer to stick with Firefox, but if it works with a different browser, that would be fine as well.

Aucun commentaire:

Enregistrer un commentaire