Class: Saucer::Config::Common

Inherits:
Object
  • Object
show all
Defined in:
lib/saucer/config/common.rb

Direct Known Subclasses

Selenium

Constant Summary collapse

CONFIG_PARAMS =
%i(auto_accept_alerts name build tags custom_data max_duration
command_timeout idle_timeout prerun executable args background
timeout tunnel_identifier parent_tunnel screen_resolution timezone
avoid_proxy public record_video video_upload_on_pass record_screenshots
record_logs capture_html priority webdriver_remote_quiet_exceptions).freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(opts = {}) ⇒ Common

Returns a new instance of Common.



13
14
15
16
17
18
19
20
# File 'lib/saucer/config/common.rb', line 13

def initialize(opts = {})
  @username = opts.delete(:username) || ENV['SAUCE_USERNAME']
  @access_key = opts.delete(:access_key) || ENV['SAUCE_ACCESS_KEY']
  @url = opts.delete(:url) || "https://#{@username}:#{@access_key}@ondemand.saucelabs.com:443/wd/hub"

  @opts = opts
  @config_params = CONFIG_PARAMS
end

Instance Attribute Details

#access_keyObject (readonly)

Returns the value of attribute access_key.



11
12
13
# File 'lib/saucer/config/common.rb', line 11

def access_key
  @access_key
end

#config_paramsObject (readonly)

Returns the value of attribute config_params.



11
12
13
# File 'lib/saucer/config/common.rb', line 11

def config_params
  @config_params
end

#urlObject (readonly)

Returns the value of attribute url.



11
12
13
# File 'lib/saucer/config/common.rb', line 11

def url
  @url
end

#usernameObject (readonly)

Returns the value of attribute username.



11
12
13
# File 'lib/saucer/config/common.rb', line 11

def username
  @username
end