Class: Applitools::Appium::Target

Inherits:
Selenium::Target
  • Object
show all
Defined in:
lib/applitools/appium/target.rb

Instance Method Summary collapse

Instance Method Details

#ignore(*args) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/applitools/appium/target.rb', line 7

def ignore(*args)
  if args.empty?
    reset_ignore
  else
    value = convert_to_universal(args)
    value = { type: args[0], selector: args[1] } if value.nil?
    # value = value[:selector] if value.is_a?(Hash) && (value[:type].to_s === 'id') && !is_a?(Applitools::Appium::Target)
    ignored_regions << value
  end
  self
end

#region(*args) ⇒ Object



19
20
21
22
23
24
25
26
27
28
29
# File 'lib/applitools/appium/target.rb', line 19

def region(*args)
  value = convert_to_universal(args)
  value = { type: args[0], selector: args[1] } if value.nil?
  # value = value[:selector] if value.is_a?(Hash) && (value[:type].to_s === 'id') && !is_a?(Applitools::Appium::Target)
  self.region_to_check = value
  self.coordinate_type = Applitools::EyesScreenshot::COORDINATE_TYPES[:context_relative]
  options[:timeout] = nil
  reset_ignore
  reset_floating
  self
end

#webview(value = true) ⇒ Object



31
32
33
34
35
# File 'lib/applitools/appium/target.rb', line 31

def webview(value = true)
  options[:webview] = value.is_a?(String) ? value : !!value
  # options[:stitch_content] = false if options[:stitch_content].nil?
  self
end