Skip to content

Instantly share code, notes, and snippets.

@boxbeatsy
Created September 24, 2018 22:30
Show Gist options
  • Save boxbeatsy/0125d17f35c9a7478dc0bef391ea60d9 to your computer and use it in GitHub Desktop.
Save boxbeatsy/0125d17f35c9a7478dc0bef391ea60d9 to your computer and use it in GitHub Desktop.
profile = Selenium::WebDriver::Firefox::Profile.new
profile['browser.download.folderList'] = 2 # custom location
profile['browser.download.dir'] = "/home/boxbeatsy/Downloads"
options = Selenium::WebDriver::Firefox::Options.new(args: ['-headless',"--display=#{headless_display_port}"], profile: profile, binary: firefox_path, page_load_strategy: 'none')
@driver = Selenium::WebDriver.for :firefox, options:options
@b = Watir::Browser.new(@driver)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment