Class: Applitools::UniversalEyes
- Inherits:
-
Object
- Object
- Applitools::UniversalEyes
- Extended by:
- Forwardable
- Defined in:
- lib/applitools/universal_sdk/universal_eyes.rb
Instance Attribute Summary collapse
-
#closed_or_aborted ⇒ Object
Returns the value of attribute closed_or_aborted.
Instance Method Summary collapse
- #abort ⇒ Object
- #check(settings, image_target = {}) ⇒ Object
- #close ⇒ Object
- #extract_text(targets_array, driver_target) ⇒ Object
- #extract_text_regions(patterns_array, driver_target) ⇒ Object
- #eyes_get_results ⇒ Object
-
#initialize(eyes, universal_client) ⇒ UniversalEyes
constructor
A new instance of UniversalEyes.
- #locate(settings, driver_target) ⇒ Object
Constructor Details
#initialize(eyes, universal_client) ⇒ UniversalEyes
Returns a new instance of UniversalEyes.
11 12 13 14 15 |
# File 'lib/applitools/universal_sdk/universal_eyes.rb', line 11 def initialize(eyes, universal_client) @eyes = eyes @universal_client = universal_client @closed_or_aborted = false end |
Instance Attribute Details
#closed_or_aborted ⇒ Object
Returns the value of attribute closed_or_aborted.
9 10 11 |
# File 'lib/applitools/universal_sdk/universal_eyes.rb', line 9 def closed_or_aborted @closed_or_aborted end |
Instance Method Details
#abort ⇒ Object
31 32 33 34 |
# File 'lib/applitools/universal_sdk/universal_eyes.rb', line 31 def abort @closed_or_aborted = true @universal_client.eyes_abort(@eyes) end |
#check(settings, image_target = {}) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/applitools/universal_sdk/universal_eyes.rb', line 17 def check(settings, image_target = {}) elapsed_time_start = Time.now # Applitools::EyesLogger.logger.debug "check settings: #{settings}" check_result = @universal_client.eyes_check(@eyes, settings, image_target) # Applitools::EyesLogger.logger.debug "check_result: #{check_result}" Applitools::EyesLogger.logger.info "Completed in #{format('%.2f', Time.now - elapsed_time_start)} seconds" check_result end |
#close ⇒ Object
26 27 28 29 |
# File 'lib/applitools/universal_sdk/universal_eyes.rb', line 26 def close @closed_or_aborted = true @universal_client.eyes_close(@eyes) end |
#extract_text(targets_array, driver_target) ⇒ Object
48 49 50 |
# File 'lib/applitools/universal_sdk/universal_eyes.rb', line 48 def extract_text(targets_array, driver_target) @universal_client.eyes_extract_text(@eyes, targets_array, driver_target) end |
#extract_text_regions(patterns_array, driver_target) ⇒ Object
44 45 46 |
# File 'lib/applitools/universal_sdk/universal_eyes.rb', line 44 def extract_text_regions(patterns_array, driver_target) @universal_client.eyes_extract_text_regions(@eyes, patterns_array, driver_target) end |
#eyes_get_results ⇒ Object
36 37 38 |
# File 'lib/applitools/universal_sdk/universal_eyes.rb', line 36 def eyes_get_results @universal_client.eyes_get_results(@eyes) end |
#locate(settings, driver_target) ⇒ Object
40 41 42 |
# File 'lib/applitools/universal_sdk/universal_eyes.rb', line 40 def locate(settings, driver_target) @universal_client.eyes_locate(@eyes, settings, driver_target) end |