Class: Selenium::WebDriver::Remote::Http::Curb

Inherits:
Common
  • Object
show all
Defined in:
lib/selenium/webdriver/remote/http/curb.rb

Overview

An alternative to the default Net::HTTP client.

This can be used for the Firefox and Remote drivers if you have Curb installed.

Examples:

Using Curb

require 'selenium/webdriver/remote/http/curb'
include Selenium

driver = WebDriver.for :firefox, :http_client => WebDriver::Remote::Http::Curb.new

Constant Summary

Constants inherited from Common

Selenium::WebDriver::Remote::Http::Common::CONTENT_TYPE, Selenium::WebDriver::Remote::Http::Common::DEFAULT_HEADERS, Selenium::WebDriver::Remote::Http::Common::MAX_REDIRECTS

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Common

#call, #close

Constructor Details

#initialize(timeout: nil) ⇒ Curb

Returns a new instance of Curb.



42
43
44
45
# File 'lib/selenium/webdriver/remote/http/curb.rb', line 42

def initialize(timeout: nil)
  @timeout = timeout
  super()
end

Instance Attribute Details

#timeoutObject

Returns the value of attribute timeout.



40
41
42
# File 'lib/selenium/webdriver/remote/http/curb.rb', line 40

def timeout
  @timeout
end

Instance Method Details

#quit_errorsObject



47
48
49
# File 'lib/selenium/webdriver/remote/http/curb.rb', line 47

def quit_errors
  [Curl::Err::RecvError] + super
end