Class: Worm
- Inherits:
-
Object
- Object
- Worm
- Includes:
- Frank::Cucumber::FrankHelper
- Defined in:
- lib/worm.rb
Instance Method Summary collapse
- #buttons ⇒ Object
-
#initialize ⇒ Worm
constructor
A new instance of Worm.
- #labels ⇒ Object
- #landscape ⇒ Object
- #portrait ⇒ Object
- #press(label) ⇒ Object
- #selector(label) ⇒ Object
- #set_text(text, label) ⇒ Object
- #tables ⇒ Object
- #text_fields ⇒ Object
- #touch_alert(button) ⇒ Object
- #type(text) ⇒ Object
- #use_physical ⇒ Object
Constructor Details
#initialize ⇒ Worm
Returns a new instance of Worm.
10 11 12 |
# File 'lib/worm.rb', line 10 def initialize Frank::Cucumber::FrankHelper.use_shelley_from_now_on end |
Instance Method Details
#labels ⇒ Object
31 32 33 |
# File 'lib/worm.rb', line 31 def labels Screen.new.accessible_labels end |
#landscape ⇒ Object
48 49 50 |
# File 'lib/worm.rb', line 48 def landscape frankly_set_orientation('landscape') end |
#portrait ⇒ Object
52 53 54 |
# File 'lib/worm.rb', line 52 def portrait frankly_set_orientation('portrait') end |
#press(label) ⇒ Object
18 19 20 21 |
# File 'lib/worm.rb', line 18 def press(label) screen = Screen.new Frank::Console.new.touch(SelectorBuilder.build(screen.view_class(label), label)) end |
#selector(label) ⇒ Object
60 61 62 63 |
# File 'lib/worm.rb', line 60 def selector(label) screen = Screen.new SelectorBuilder.build(screen.view_class(label), label) end |
#set_text(text, label) ⇒ Object
39 40 41 42 |
# File 'lib/worm.rb', line 39 def set_text(text, label) screen = Screen.new Frank::Console.new.touch(SelectorBuilder.build(screen.view_class(label), text)) end |
#tables ⇒ Object
35 36 37 |
# File 'lib/worm.rb', line 35 def tables Screen.new.accessible_tables end |
#text_fields ⇒ Object
27 28 29 |
# File 'lib/worm.rb', line 27 def text_fields Screen.new.accessible_text_fields end |
#touch_alert(button) ⇒ Object
56 57 58 |
# File 'lib/worm.rb', line 56 def touch_alert() touch("view:'UIAlertButton' marked:'#{}'") end |
#type(text) ⇒ Object
44 45 46 |
# File 'lib/worm.rb', line 44 def type(text) Frank::Console.new.type_into_keyboard(text) end |
#use_physical ⇒ Object
14 15 16 |
# File 'lib/worm.rb', line 14 def use_physical Frank::Cucumber::FrankHelper.test_on_physical_device_via_bonjour end |