Created
January 15, 2016 06:55
-
-
Save bltb/e5dccd258b5c68a2c171 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
elsif DRIVER == :phantomjs | |
capabilities = Selenium::WebDriver::Remote::Capabilities.phantomjs("phantomjs.page.settings.userAgent" => "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36 PerformanceMonitoringBot/0.0.2") | |
# XXX. exclude | |
case `hostname`.strip | |
when | |
"ip-172-31-26-205", | |
"ip-172-31-8-248" #, | |
# "embora" | |
args = [] | |
else | |
log.warn("Proxy enabled") | |
args = ['--ignore-ssl-errors=true', '--proxy=http://localhost:9099'] | |
end | |
driver = Selenium::WebDriver.for( | |
:phantomjs, | |
desired_capabilities: capabilities, | |
http_client: client, | |
args: args | |
) | |
else |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment