Class: Applitools::UniversalEyes

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/applitools/universal_sdk/universal_eyes.rb

Instance Method Summary collapse

Constructor Details

#initialize(eyes, universal_client) ⇒ UniversalEyes

Returns a new instance of UniversalEyes.



9
10
11
12
# File 'lib/applitools/universal_sdk/universal_eyes.rb', line 9

def initialize(eyes, universal_client)
  @eyes = eyes
  @universal_client = universal_client
end

Instance Method Details

#abortObject



27
28
29
# File 'lib/applitools/universal_sdk/universal_eyes.rb', line 27

def abort
  @universal_client.eyes_abort(@eyes)
end

#check(settings) ⇒ Object



14
15
16
17
18
19
20
21
# File 'lib/applitools/universal_sdk/universal_eyes.rb', line 14

def check(settings)
  elapsed_time_start = Time.now
  # Applitools::EyesLogger.logger.debug "check settings: #{settings}"
  check_result = @universal_client.eyes_check(@eyes, settings)
  # 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

#closeObject



23
24
25
# File 'lib/applitools/universal_sdk/universal_eyes.rb', line 23

def close
  @universal_client.eyes_close(@eyes)
end

#extract_text(targets_array) ⇒ Object



39
40
41
# File 'lib/applitools/universal_sdk/universal_eyes.rb', line 39

def extract_text(targets_array)
  @universal_client.eyes_extract_text(@eyes, targets_array)
end

#extract_text_regions(patterns_array) ⇒ Object



35
36
37
# File 'lib/applitools/universal_sdk/universal_eyes.rb', line 35

def extract_text_regions(patterns_array)
  @universal_client.eyes_extract_text_regions(@eyes, patterns_array)
end

#locate(settings) ⇒ Object



31
32
33
# File 'lib/applitools/universal_sdk/universal_eyes.rb', line 31

def locate(settings)
  @universal_client.eyes_locate(@eyes, settings)
end