selenium - How to save Firefox webdriver session in python -
to save chromedriver session, used snippet of code:
from selenium import webdriver selenium.webdriver.chrome.options import options options = options() options.add_argument('user-data-dir= path save session') driver = webdriver.chrome(executable_path='path chromedriver.exe', chrome_options=options)
i tried same thing firefox doesn't seem work:
from selenium import webdriver selenium.webdriver.firefox.options import options options = options() options.add_argument('user-data-dir= path save session') driver = webdriver.firefox(executable_path='path geckodriver.exe', firefox_options=options)
is right way go or did miss something?
Comments
Post a Comment