Class: Gridium::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/gridium.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# File 'lib/gridium.rb', line 28

def initialize
  @report_dir = Dir.home
  @browser_source = :local  #if browser source is set to remote, target environment needs to be set properly
  @selenium_log_level = 'OFF' #OFF, SEVERE, WARNING, INFO, DEBUG, ALL https://github.com/SeleniumHQ/selenium/wiki/Logging
  @target_environment = "localhost"
  @browser = :chrome
  @url = "about:blank"
  @page_load_timeout = 15
  @page_load_retries = 0
  @element_timeout = 15  #This needs to be changed to only look for an element after a page is done loading
  @visible_elements_only = true
  @log_level = :fatal
  @highlight_verifications = false
  @highlight_duration = 0.100
  @screenshot_on_failure = false
  @screenshots_to_s3 = false
  @project_name_for_s3 = 'gridium'
  @subdirectory_name_for_s3 = '' #rely on GridiumS3 default
  @testrail = false
end

Instance Attribute Details

#browserObject

Returns the value of attribute browser.



24
25
26
# File 'lib/gridium.rb', line 24

def browser
  @browser
end

#browser_sourceObject

Returns the value of attribute browser_source.



24
25
26
# File 'lib/gridium.rb', line 24

def browser_source
  @browser_source
end

#element_timeoutObject

Returns the value of attribute element_timeout.



24
25
26
# File 'lib/gridium.rb', line 24

def element_timeout
  @element_timeout
end

#highlight_durationObject

Returns the value of attribute highlight_duration.



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

def highlight_duration
  @highlight_duration
end

#highlight_verificationsObject

Returns the value of attribute highlight_verifications.



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

def highlight_verifications
  @highlight_verifications
end

#log_levelObject

Returns the value of attribute log_level.



24
25
26
# File 'lib/gridium.rb', line 24

def log_level
  @log_level
end

#page_load_retriesObject

Returns the value of attribute page_load_retries.



24
25
26
# File 'lib/gridium.rb', line 24

def page_load_retries
  @page_load_retries
end

#page_load_timeoutObject

Returns the value of attribute page_load_timeout.



24
25
26
# File 'lib/gridium.rb', line 24

def page_load_timeout
  @page_load_timeout
end

#project_name_for_s3Object

Returns the value of attribute project_name_for_s3.



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

def project_name_for_s3
  @project_name_for_s3
end

#report_dirObject

Returns the value of attribute report_dir.



24
25
26
# File 'lib/gridium.rb', line 24

def report_dir
  @report_dir
end

#screenshot_on_failureObject

Returns the value of attribute screenshot_on_failure.



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

def screenshot_on_failure
  @screenshot_on_failure
end

#screenshots_to_s3Object

Returns the value of attribute screenshots_to_s3.



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

def screenshots_to_s3
  @screenshots_to_s3
end

#selenium_log_levelObject

Returns the value of attribute selenium_log_level.



26
27
28
# File 'lib/gridium.rb', line 26

def selenium_log_level
  @selenium_log_level
end

#subdirectory_name_for_s3Object

Returns the value of attribute subdirectory_name_for_s3.



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

def subdirectory_name_for_s3
  @subdirectory_name_for_s3
end

#target_environmentObject

Returns the value of attribute target_environment.



24
25
26
# File 'lib/gridium.rb', line 24

def target_environment
  @target_environment
end

#testrailObject

Returns the value of attribute testrail.



26
27
28
# File 'lib/gridium.rb', line 26

def testrail
  @testrail
end

#urlObject

Returns the value of attribute url.



24
25
26
# File 'lib/gridium.rb', line 24

def url
  @url
end

#visible_elements_onlyObject

Returns the value of attribute visible_elements_only.



24
25
26
# File 'lib/gridium.rb', line 24

def visible_elements_only
  @visible_elements_only
end