Class: Furter::Accessors::View

Inherits:
Object
  • Object
show all
Includes:
Frank::Cucumber::FrankHelper, Frank::Cucumber::WaitHelper, Furter
Defined in:
lib/furter/accessors/view.rb

Direct Known Subclasses

AlertButton, Button, Label, MapPin, Slider, Switch, Table, Text

Constant Summary

Constants included from Furter

TIMEOUT, VERSION

Instance Method Summary collapse

Methods included from Furter

#exists?, #has_text?, included, #wait_for, #wait_for_and_touch, #wait_for_text

Constructor Details

#initialize(locator = {}) ⇒ View

Returns a new instance of View.



6
7
8
# File 'lib/furter/accessors/view.rb', line 6

def initialize(locator={})
  @locator = locator
end

Instance Method Details

#clickObject



10
11
12
13
# File 'lib/furter/accessors/view.rb', line 10

def click

  wait_for_and_touch selector
end

#enabled?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/furter/accessors/view.rb', line 19

def enabled?
  frankly_map(selector, 'isEnabled')[0]
end

#next_respondersObject



23
24
25
26
27
# File 'lib/furter/accessors/view.rb', line 23

def next_responders
  frankly_map("view:'UIView'", 'nextResponder').map do |r|
    r.gsub(/[<>]/,'')
  end
end

#visible?Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/furter/accessors/view.rb', line 15

def visible?
  element_is_not_hidden selector
end