Explore Courses Blog Tutorials Interview Questions
0 votes
1 view
in Selenium by (7k points)

I want  selenium base to use my existing session when it launches vs starting a clean one.

How to start selenium using an existing session?


driver = webdriver.Chrome('/snap/bin/chromium.chromedriver', options=option)

1 Answer

0 votes
by (31.9k points)
edited by

You can use the default chrome profile.

options = webdriver.ChromeOptions()

options.add_argument("user-data-dir=PATH") #)PATH is path to your chrome profile

w = webdriver.Chrome(executable_path="C:\\Users\\chromedriver.exe", chrome_options=options)

To find path to your chrome profile data, type chrome://version/ into address bar.

Want to learn Selenium, checkout our Selenium training.

Related questions

Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers


94.1k users

Browse Categories