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

Popular posts from this blog

html - How to set bootstrap input responsive width? -

javascript - Highchart x and y axes data from json -

javascript - Get js console.log as python variable in QWebView pyqt -