Module: Calabash::Cucumber::IOS7Operations
Instance Method Summary
collapse
#_deprecated, #debug_logging?, #default_device, #device_family_iphone?, #full_console_logging?, #ios5?, #ios6?, #ios7?, #ipad?, #iphone?, #iphone_4in?, #iphone_5?, #iphone_app_emulated_on_ipad?, #ipod?, #no_deprecation_warnings?, #simulator?, #uia_available?, #uia_not_available?, #xamarin_test_cloud?
Methods included from UIA
#escape_uia_string, #send_uia_command, #uia, #uia_call, #uia_call_method, #uia_double_tap, #uia_double_tap_mark, #uia_double_tap_offset, #uia_element_does_not_exist?, #uia_element_exists?, #uia_enter, #uia_flick_offset, #uia_handle_command, #uia_names, #uia_pan, #uia_pan_offset, #uia_pinch, #uia_pinch_offset, #uia_query, #uia_query_el, #uia_query_windows, #uia_screenshot, #uia_scroll_to, #uia_send_app_to_background, #uia_serialize_argument, #uia_serialize_arguments, #uia_serialize_command, #uia_set_location, #uia_swipe, #uia_swipe_offset, #uia_tap, #uia_tap_mark, #uia_tap_offset, #uia_touch_hold, #uia_touch_hold_offset, #uia_two_finger_tap, #uia_two_finger_tap_offset, #uia_type_string
Instance Method Details
#double_tap_ios7(options) ⇒ Object
69
70
71
72
73
74
75
76
77
78
79
80
|
# File 'lib/calabash-cucumber/ios7_operations.rb', line 69
def double_tap_ios7(options)
ui_query = options[:query]
offset = options[:offset]
if ui_query.nil?
uia_double_tap_offset(offset)
else
el_to_swipe = find_and_normalize_or_raise(ui_query)
offset = point_from(el_to_swipe, options)
uia_double_tap_offset(offset)
[el_to_swipe]
end
end
|
#flick_ios7(options, delta) ⇒ Object
95
96
97
98
99
100
101
102
103
104
105
106
|
# File 'lib/calabash-cucumber/ios7_operations.rb', line 95
def flick_ios7(options, delta)
ui_query = options[:query]
offset = options[:offset]
if ui_query.nil?
uia_flick_offset(offset, add_offset(offset, delta))
else
el_to_swipe = find_and_normalize_or_raise(ui_query)
offset = point_from(el_to_swipe, options)
uia_flick_offset(offset, add_offset(offset, delta))
[el_to_swipe]
end
end
|
#pan_ios7(from, to, options = {}) ⇒ Object
60
61
62
63
64
65
66
67
|
# File 'lib/calabash-cucumber/ios7_operations.rb', line 60
def pan_ios7(from, to, options={})
from_result = find_and_normalize_or_raise from
to_result = find_and_normalize_or_raise to
uia_pan_offset(point_from(from_result, options),
point_from(to_result, options),
options)
[to_result]
end
|
#pinch_ios7(in_or_out, options) ⇒ Object
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# File 'lib/calabash-cucumber/ios7_operations.rb', line 46
def pinch_ios7(in_or_out, options)
ui_query = options[:query]
offset = options[:offset]
duration = options[:duration] || 0.5
if ui_query.nil?
uia_pinch_offset(in_or_out, offset, {:duration => options[:duration]})
else
el_to_pinch = find_and_normalize_or_raise(ui_query)
offset = point_from(el_to_pinch, options)
uia_pinch_offset(in_or_out, offset, duration)
[el_to_pinch]
end
end
|
#swipe_ios7(options) ⇒ Object
33
34
35
36
37
38
39
40
41
42
43
44
|
# File 'lib/calabash-cucumber/ios7_operations.rb', line 33
def swipe_ios7(options)
ui_query = options[:query]
offset = options[:offset]
if ui_query.nil?
uia_swipe_offset(offset, options)
else
el_to_swipe = find_and_normalize_or_raise(ui_query)
offset = point_from(el_to_swipe, options)
uia_swipe_offset(offset, options)
[el_to_swipe]
end
end
|
#touch_hold_ios7(options) ⇒ Object
108
109
110
111
112
113
114
115
116
117
118
119
120
|
# File 'lib/calabash-cucumber/ios7_operations.rb', line 108
def touch_hold_ios7(options)
ui_query = options[:query]
offset = options[:offset]
duration = options[:duration] || 4
if ui_query.nil?
uia_touch_hold_offset(duration, offset)
else
el_to_swipe = find_and_normalize_or_raise(ui_query)
offset = point_from(el_to_swipe, options)
uia_touch_hold_offset(duration, offset)
[el_to_swipe]
end
end
|
#touch_ios7(options) ⇒ Object
DEPRECATED
abstracted into actions/instruments_actions.rb
- actions that can be performed under instruments
21
22
23
24
25
26
27
28
29
30
31
|
# File 'lib/calabash-cucumber/ios7_operations.rb', line 21
def touch_ios7(options)
ui_query = options[:query]
offset = options[:offset]
if ui_query.nil?
uia_tap_offset(offset)
else
el_to_touch = find_and_normalize_or_raise(ui_query)
touch(el_to_touch, options)
[el_to_touch]
end
end
|
#two_finger_tap_ios7(options) ⇒ Object
82
83
84
85
86
87
88
89
90
91
92
93
|
# File 'lib/calabash-cucumber/ios7_operations.rb', line 82
def two_finger_tap_ios7(options)
ui_query = options[:query]
offset = options[:offset]
if ui_query.nil?
uia_two_finger_tap_offset(offset)
else
el_to_swipe = find_and_normalize_or_raise(ui_query)
offset = point_from(el_to_swipe, options)
uia_two_finger_tap_offset(offset)
[el_to_swipe]
end
end
|