Back

Explore Courses Blog Tutorials Interview Questions
+1 vote
1 view
in Selenium by (29.3k points)
edited by

I want my selenium base to use my existing session when it launches. How can i start selenium using an existing session?

webdriver:

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

Tried with the above but the issue still persists.

1 Answer

0 votes
by (50.2k points)

Here for this case, you can use the default chrome profile that will help your selenium base to use the existing session.

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)

The above will help you to use the selenium base.

For more details, refer to this selenium training.

Related questions

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

28.4k questions

29.7k answers

500 comments

94.1k users

Browse Categories

...