Home > Software design >  Python/Selenium - Clear the cookies in my chrome webdriver?
Python/Selenium - Clear the cookies in my chrome webdriver?

Time:05-09

I'm trying to clearcookies in my chrome browser (webdriver from selenium) but I can't find any solutions for specifically the chrome driver. How do I clear the cache and cookies in Python?

import undetected_chromedriver.v2 as uc
if __name__ == '__main__':
    driver = uc.Chrome()
    dar_like()
    driver.delete_all_cookies()
    driver.get('https://www.google.com') 

CodePudding user response:

Cookies and cache are never saved unless you set a profile in options or manually save them via pickle etc.

  • Related