google reacptcha issue faced when accessed the website using selenium python in automation.using session to avoid the login page with web driver ,is there any chance in selenium python?
Asked
Active
Viewed 327 times
1
-
Post the code you've tried and the URL, then explain your issue clearly. – AbiSaran Feb 09 '23 at 13:51
-
any sample code? – Raja Muhamed Feb 09 '23 at 13:58
-
yes, this should be possible using cookies. Please provide some code. – kaliiiiiiiii Feb 09 '23 at 19:40
1 Answers
0
Easiest way is to load a user profile where you are already logged in. With this method when you run driver.get(url) you will be already logged in, because it uses the cookies of the user profile. This is the code in python
options = webdriver.ChromeOptions()
options.add_argument("user-data-dir=C:\\Users\\username\\AppData\\Local\\Google\\Chrome\\User Data")
options.add_argument("profile-directory=Profile 2")
driver = webdriver.Chrome(..., options=options)
driver.get(url)
# now you are already logged in
and here you find a step by step tutorial on how to create a user profile in Chrome and load it in chromedriver.
sound wave
- 3,191
- 3
- 11
- 29