Class: Applitools::Appium::Target
- Inherits:
-
Object
- Object
- Applitools::Appium::Target
- Includes:
- FluentInterface
- Defined in:
- lib/applitools/appium/target.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#region_to_check ⇒ Object
Returns the value of attribute region_to_check.
Class Method Summary collapse
Instance Method Summary collapse
- #finalize ⇒ Object
-
#initialize ⇒ Target
constructor
A new instance of Target.
- #region(*args) ⇒ Object
Methods included from FluentInterface
#enable_patterns, #ignore_caret, #ignore_displacements, #ignore_mismatch, included, #match_level, #timeout, #trim
Methods included from MatchLevelSetter
Constructor Details
#initialize ⇒ Target
Returns a new instance of Target.
20 21 22 23 |
# File 'lib/applitools/appium/target.rb', line 20 def initialize self.region_to_check = proc { Applitools::Region::EMPTY } self. = {} end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
8 9 10 |
# File 'lib/applitools/appium/target.rb', line 8 def @options end |
#region_to_check ⇒ Object
Returns the value of attribute region_to_check.
8 9 10 |
# File 'lib/applitools/appium/target.rb', line 8 def region_to_check @region_to_check end |
Class Method Details
.region(*args) ⇒ Object
15 16 17 |
# File 'lib/applitools/appium/target.rb', line 15 def region(*args) new.region(*args) end |
.window ⇒ Object
11 12 13 |
# File 'lib/applitools/appium/target.rb', line 11 def window new end |
Instance Method Details
#finalize ⇒ Object
37 38 39 |
# File 'lib/applitools/appium/target.rb', line 37 def finalize self end |
#region(*args) ⇒ Object
25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/applitools/appium/target.rb', line 25 def region(*args) self.region_to_check = case args.first when ::Selenium::WebDriver::Element proc { args.first } else proc do |driver| driver.find_element(*args) end end self end |