Answers for "user-data-dir=selenium cookie"

3

python selenium save cookies

# read cookies

import pickle
import selenium.webdriver 

driver = selenium.webdriver.Firefox()
driver.get("http://www.google.com")
cookies = pickle.load(open("cookies.pkl", "rb"))
for cookie in cookies:
    driver.add_cookie(cookie)
Posted by: Guest on August-25-2020

Python Answers by Framework

Browse Popular Code Answers by Language