Module: BlackStack::BaseProxy
- Included in:
- Proxy, RemoteProxy
- Defined in:
- lib/baseproxy.rb
Instance Method Summary collapse
- #chrome_switches ⇒ Object
-
#firefox_profile_parameter(agent_name = nil, profile_name = nil) ⇒ Object
Warning: Out to Date.
-
#phantomjs_switches ⇒ Object
Warning: Out to Date.
Instance Method Details
#chrome_switches ⇒ Object
6 7 8 |
# File 'lib/baseproxy.rb', line 6 def chrome_switches return ["--proxy-server=#{self.ip}:#{self.port}","--proxy-user-and-password=#{self.user}:#{self.password}"] end |
#firefox_profile_parameter(agent_name = nil, profile_name = nil) ⇒ Object
Warning: Out to Date
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/baseproxy.rb', line 11 def firefox_profile_parameter(agent_name = nil, profile_name = nil) if (profile_name == nil) profile = Selenium::WebDriver::Firefox::Profile.new else profile = Selenium::WebDriver::Firefox::Profile.from_name profile_name end if (agent_name!=nil) profile['general.useragent.override'] = agent_name end proxy = Selenium::WebDriver::Proxy.new(:http => self.ip.to_s+":"+self.port.to_s, :ssl => self.ip.to_s+":"+self.port.to_s) profile.proxy = proxy return profile end |
#phantomjs_switches ⇒ Object
Warning: Out to Date
28 29 30 |
# File 'lib/baseproxy.rb', line 28 def phantomjs_switches return ['--proxy='+self.ip.to_s+':'+self.port.to_s, '--proxy-auth='+self.user.to_s+':'+self.password.to_s, '--ignore-ssl-errors=yes', '--ssl-protocol=any', '--load-images=false'] end |