0

Im writing a selenium-webdriver script in ruby and im trying to figure out how to make the browser window that selenium opens use a proxy with user pass authentication.

i.e. (234.43.234:2345:user:pass)

so far my code is thus....

    def scrape_n_vote
      driver = Selenium::WebDriver.for(:chrome)
      loop do
        driver.get "https://poll.fm/poll_id"
        driver.find_element(id: 'answer_id').click
        sleep 1
        driver.find_element(class: 'btn-large').click
        sleep rand(1..3)
      end
    end

Does anyone know how to make the browser programatically accept a proxy via this ruby script for chrome to make the connection with?

Verty00
  • 726
  • 5
  • 16
  • Try https://github.com/SeleniumHQ/selenium/wiki/Ruby-Bindings#remote – orde Feb 26 '19 at 22:26
  • @orde Sorry thats if you want to use selenium to control a chrom instance on a remote computer at a specific ip. I just want to initialize chrome to connect to the web via a proxy. – Verty00 Feb 26 '19 at 23:22

0 Answers0