Module: Applitools::FluentInterface

Includes:
MatchLevelSetter
Defined in:
lib/applitools/core/fluent_interface.rb

Instance Method Summary collapse

Methods included from MatchLevelSetter

#match_level_with_exact

Instance Method Details

#ignore_caret(value = false) ⇒ Object



4
5
6
7
# File 'lib/applitools/core/fluent_interface.rb', line 4

def ignore_caret(value = false)
  options[:ignore_caret] = value ? true : false
  self
end

#ignore_mismatch(value) ⇒ Object



19
20
21
22
# File 'lib/applitools/core/fluent_interface.rb', line 19

def ignore_mismatch(value)
  options[:ignore_mismatch] = value ? true : false
  self
end

#match_level(value, exact_options = {}) ⇒ Target

Sets match_level for current test

Parameters:

  • value (Symbol)

    Can be one of allowed match levels - :none, :layout, :layout2, :content, :strict or :exact

  • exact_options (Hash) (defaults to: {})

    exact options are used only for :exact match level

Options Hash (exact_options):

  • :min_diff_intensity (Integer)
  • :min_diff_width (Integer)
  • :min_diff_height (Integer)
  • :match_threshold (Integer)

Returns:

  • (Target)

    Applitools::Selenium::Target or Applitools::Images::target



33
34
35
36
# File 'lib/applitools/core/fluent_interface.rb', line 33

def match_level(value, exact_options = {})
  options[:match_level], options[:exact] = match_level_with_exact(value, exact_options)
  self
end

#timeout(value) ⇒ Object



9
10
11
12
# File 'lib/applitools/core/fluent_interface.rb', line 9

def timeout(value)
  options[:timeout] = value.to_i
  self
end

#trim(value = true) ⇒ Object



14
15
16
17
# File 'lib/applitools/core/fluent_interface.rb', line 14

def trim(value = true)
  options[:trim] = value ? true : false
  self
end