Module: Webdrivers

Defined in:
lib/webdrivers/logger.rb,
lib/webdrivers/common.rb,
lib/webdrivers/system.rb,
lib/webdrivers/network.rb,
lib/webdrivers/iedriver.rb,
lib/webdrivers/geckodriver.rb,
lib/webdrivers/mswebdriver.rb,
lib/webdrivers/chromedriver.rb

Overview

Defined Under Namespace

Classes: Chromedriver, Common, ConnectionError, Geckodriver, IEdriver, Logger, MSWebdriver, Network, System, VersionError

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.cache_timeObject

Returns the amount of time (Seconds) the gem waits between two update checks.


25
26
27
# File 'lib/webdrivers/common.rb', line 25

def cache_time
  @cache_time || 0
end

.install_dirObject

Returns the value of attribute install_dir


18
19
20
# File 'lib/webdrivers/common.rb', line 18

def install_dir
  @install_dir
end

.proxy_addrObject

Returns the value of attribute proxy_addr


18
19
20
# File 'lib/webdrivers/common.rb', line 18

def proxy_addr
  @proxy_addr
end

.proxy_passObject

Returns the value of attribute proxy_pass


18
19
20
# File 'lib/webdrivers/common.rb', line 18

def proxy_pass
  @proxy_pass
end

.proxy_portObject

Returns the value of attribute proxy_port


18
19
20
# File 'lib/webdrivers/common.rb', line 18

def proxy_port
  @proxy_port
end

.proxy_userObject

Returns the value of attribute proxy_user


18
19
20
# File 'lib/webdrivers/common.rb', line 18

def proxy_user
  @proxy_user
end

Class Method Details

.configure {|_self| ... } ⇒ Object

Provides a convenient way to configure the gem.

Examples:

Configure proxy and cache_time

Webdrivers.configure do |config|
  config.proxy_addr = 'myproxy_address.com'
  config.proxy_port = '8080'
  config.proxy_user = 'username'
  config.proxy_pass = 'password'
  config.cache_time = 604_800 # 7 days
end

Yields:

  • (_self)

Yield Parameters:

  • _self (Webdrivers)

    the object that the method was called on


45
46
47
# File 'lib/webdrivers/common.rb', line 45

def configure
  yield self
end

.loggerObject


29
30
31
# File 'lib/webdrivers/common.rb', line 29

def logger
  @logger ||= Webdrivers::Logger.new
end

.net_http_ssl_fixObject


49
50
51
52
# File 'lib/webdrivers/common.rb', line 49

def net_http_ssl_fix
  raise 'Webdrivers.net_http_ssl_fix is no longer available.' \
  ' Please see https://github.com/titusfortner/webdrivers#ssl_connect-errors.'
end