Class: Worm

Inherits:
Object
  • Object
show all
Includes:
Frank::Cucumber::FrankHelper
Defined in:
lib/worm.rb

Instance Method Summary collapse

Constructor Details

#initializeWorm

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

#buttonsObject



23
24
25
# File 'lib/worm.rb', line 23

def buttons
  Screen.new.accessible_buttons
end

#labelsObject



31
32
33
# File 'lib/worm.rb', line 31

def labels
  Screen.new.accessible_labels
end

#landscapeObject



48
49
50
# File 'lib/worm.rb', line 48

def landscape
  frankly_set_orientation('landscape')
end

#portraitObject



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

#tablesObject



35
36
37
# File 'lib/worm.rb', line 35

def tables
  Screen.new.accessible_tables
end

#text_fieldsObject



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(button)
  touch("view:'UIAlertButton' marked:'#{button}'")
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_physicalObject



14
15
16
# File 'lib/worm.rb', line 14

def use_physical
  Frank::Cucumber::FrankHelper.test_on_physical_device_via_bonjour
end