Module: Cukunity::IOS::KeyboardInput
Constant Summary
Constants included
from Utils
Utils::MOBILE_DEVICE_DEFAULT_TIMEOUT
Class Method Summary
collapse
Methods included from Utils
bundle_identifier, device_udid, mobile_device_cmd, uiautomation_cmd, unity_command
Methods included from Utils
#check_timeout, #merge_options, #restrict_options, #to_options, #wait_connectivity
open
Class Method Details
.clear_text(options = {}) ⇒ Object
20
21
22
23
24
|
# File 'lib/cukunity/drivers/iOS/keyboard_input.rb', line 20
def self.clear_text(options = {})
keyboard_command(options) do
'clearText'
end
end
|
44
45
46
47
48
|
# File 'lib/cukunity/drivers/iOS/keyboard_input.rb', line 44
def self.keyboard_buttons(options = {})
keyboard_command(options) do
'keyboardButtons'
end
end
|
.keyboard_keys(options = {}) ⇒ Object
50
51
52
53
54
|
# File 'lib/cukunity/drivers/iOS/keyboard_input.rb', line 50
def self.keyboard_keys(options = {})
keyboard_command(options) do
'keyboardKeys'
end
end
|
.press_back(options = {}) ⇒ Object
60
61
62
|
# File 'lib/cukunity/drivers/iOS/keyboard_input.rb', line 60
def self.press_back(options = {})
press_done(options)
end
|
32
33
34
35
36
|
# File 'lib/cukunity/drivers/iOS/keyboard_input.rb', line 32
def self.press_button(code, options = {})
keyboard_command(options) do
['tapKeyboardButton', { 'button' => code }]
end
end
|
.press_delete(options = {}) ⇒ Object
72
73
74
|
# File 'lib/cukunity/drivers/iOS/keyboard_input.rb', line 72
def self.press_delete(options = {})
press_button('Delete', options)
end
|
.press_done(options = {}) ⇒ Object
56
57
58
|
# File 'lib/cukunity/drivers/iOS/keyboard_input.rb', line 56
def self.press_done(options = {})
press_toolbar_button('Done', options)
end
|
.press_enter(options = {}) ⇒ Object
64
65
66
|
# File 'lib/cukunity/drivers/iOS/keyboard_input.rb', line 64
def self.press_enter(options = {})
press_button('return', options)
end
|
.press_key(code, options = {}) ⇒ Object
26
27
28
29
30
|
# File 'lib/cukunity/drivers/iOS/keyboard_input.rb', line 26
def self.press_key(code, options = {})
keyboard_command(options) do
['tapKeyboardKey', { 'key' => code }]
end
end
|
.press_space(options = {}) ⇒ Object
68
69
70
|
# File 'lib/cukunity/drivers/iOS/keyboard_input.rb', line 68
def self.press_space(options = {})
press_key('space', options)
end
|
38
39
40
41
42
|
# File 'lib/cukunity/drivers/iOS/keyboard_input.rb', line 38
def self.press_toolbar_button(code, options = {})
keyboard_command(options) do
['tapKeyboardToolbarButton', { 'button' => code }]
end
end
|
.type_text(text, options = {}) ⇒ Object
14
15
16
17
18
|
# File 'lib/cukunity/drivers/iOS/keyboard_input.rb', line 14
def self.type_text(text, options = {})
keyboard_command(options) do
['typeText', { 'text' => text.to_s }]
end
end
|
.typed_text(options = {}) ⇒ Object
7
8
9
10
11
12
|
# File 'lib/cukunity/drivers/iOS/keyboard_input.rb', line 7
def self.typed_text(options = {})
res = keyboard_command(options) do
'typedText'
end
res['text']
end
|