Created
June 17, 2013 20:16
-
-
Save dimacus/5799947 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Setup Firefox profile to use proxy | |
profile = Selenium::WebDriver::Firefox::Profile.new | |
profile["network.proxy.type"] = 1 | |
profile["network.proxy.http"] = "127.0.0.1" | |
profile["network.proxy.http_port"] = 9001 | |
#Add urls to be exluded from Black Hole proxy | |
profile["network.proxy.no_proxies_on"] = "localhost, 127.0.0.1" | |
#Add profile to options | |
options[:profile] = profile | |
#Create browser | |
browser = Selenium::WebDriver.for :firefox, options |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment