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

networking - Vagrant-provisioned VirtualBox VM is not reachable from Ubuntu host -

c# - ASP.NET Core - There is already an object named 'AspNetRoles' in the database -

ruby on rails - ArgumentError: Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true -