module Webdrivers
Code adapted from Selenium
Implementation github.com/SeleniumHQ/selenium/blob/master/rb/lib/selenium/webdriver/common/logger.rb
Constants
- DEFAULT_CACHE_TIME
- DEFAULT_INSTALL_DIR
- VERSION
Attributes
cache_time[W]
install_dir[W]
proxy_addr[RW]
proxy_pass[RW]
proxy_port[RW]
proxy_user[RW]
Public Class Methods
cache_time()
click to toggle source
Returns the amount of time (Seconds) the gem waits between two update checks. @note Value from the environment variable “WD_CACHE_TIME” takes precedence over Webdrivers.cache_time
. If neither are set, it defaults to 86,400 Seconds (24 hours).
# File lib/webdrivers/common.rb, line 35 def cache_time @cache_time ||= (ENV['WD_CACHE_TIME'] || DEFAULT_CACHE_TIME) @cache_time.to_i end
configure() { |self| ... }
click to toggle source
Provides a convenient way to configure the gem.
@example 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
# File lib/webdrivers/common.rb, line 64 def configure yield self end
install_dir()
click to toggle source
Returns the install (download) directory path for the drivers.
@return [String]
# File lib/webdrivers/common.rb, line 44 def install_dir @install_dir ||= ENV['WD_INSTALL_DIR'] || DEFAULT_INSTALL_DIR end
logger()
click to toggle source
# File lib/webdrivers/common.rb, line 48 def logger @logger ||= Webdrivers::Logger.new end
net_http_ssl_fix()
click to toggle source
# File lib/webdrivers/common.rb, line 68 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