I
I
Igor2020-05-17 16:33:03
Python
Igor, 2020-05-17 16:33:03

How to implement session saving in selenium chrome so that login information is saved?

The bottom line is: there is a site on which I need to parse the response that is generated by js by entering data into the input. For this I use selenium. Also, first you need to login to this site.
So, is there a way, after I have entered this site, to save this session information so that in subsequent instances of the Selenium driver I will be immediately logged into the site. This is necessary in principle in order to bypass this step, as well as in order to launch a multi-threaded driver for several instances (accordingly, they must be immediately logged in) and for them to work on their own.
As an additional question: can you recommend any up-to-date simple python libraries for implementing selenium driver multithreading?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Daria Motorina, 2020-05-17
Mnimyy @Yittton

To save data between sessions, you need to create a chrome user profile and specify the path to the folder with this profile in the chromedriver config code. Usually, you need to create a profile in advance (log in as a user to your chrome, create a new user, find the folder with this profile in the system and copy it to your repository).
Example on SO

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question