Method: Selenium::WebDriver::Proxy#as_json

Defined in:
lib/selenium/webdriver/common/proxy.rb

#as_jsonObject

[View source]

142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
# File 'lib/selenium/webdriver/common/proxy.rb', line 142

def as_json(*)
  json_result = {
    'proxyType' => TYPES[type].downcase,
    'ftpProxy' => ftp,
    'httpProxy' => http,
    'noProxy' => no_proxy.is_a?(String) ? no_proxy.split(', ') : no_proxy,
    'proxyAutoconfigUrl' => pac,
    'sslProxy' => ssl,
    'autodetect' => auto_detect,
    'socksProxy' => socks,
    'socksUsername' => socks_username,
    'socksPassword' => socks_password,
    'socksVersion' => socks_version
  }.compact

  json_result if json_result.length > 1
end