@@ -7,7 +7,7 @@ module Android
7
7
private
8
8
9
9
# @private
10
- def _button_visible_selectors opts = { }
10
+ def _button_visible_selectors ( opts = { } )
11
11
button_index = opts . fetch :button_index , false
12
12
image_button_index = opts . fetch :image_button_index , false
13
13
@@ -21,14 +21,14 @@ def _button_visible_selectors opts = {}
21
21
end
22
22
23
23
# @private
24
- def _button_exact_string value
24
+ def _button_exact_string ( value )
25
25
button = string_visible_exact Button , value
26
26
image_button = string_visible_exact ImageButton , value
27
27
button + image_button
28
28
end
29
29
30
30
# @private
31
- def _button_contains_string value
31
+ def _button_contains_string ( value )
32
32
button = string_visible_contains Button , value
33
33
image_button = string_visible_contains ImageButton , value
34
34
button + image_button
@@ -40,7 +40,7 @@ def _button_contains_string value
40
40
# @param value [String, Integer] the value to exactly match.
41
41
# If int then the button at that index is returned.
42
42
# @return [Button]
43
- def button value
43
+ def button ( value )
44
44
# Don't use ele_index because that only works on one element type.
45
45
# Android needs to combine button and image button to match iOS.
46
46
if value . is_a? Numeric
@@ -57,7 +57,7 @@ def button value
57
57
# If value is omitted, all buttons are returned.
58
58
# @param value [String] the value to search for
59
59
# @return [Array<Button>]
60
- def buttons value = false
60
+ def buttons ( value = false )
61
61
return find_elements :uiautomator , _button_visible_selectors unless value
62
62
find_elements :uiautomator , _button_contains_string ( value )
63
63
end
@@ -86,14 +86,14 @@ def last_button
86
86
# Find the first button that exactly matches value.
87
87
# @param value [String] the value to match exactly
88
88
# @return [Button]
89
- def button_exact value
89
+ def button_exact ( value )
90
90
find_element :uiautomator , _button_exact_string ( value )
91
91
end
92
92
93
93
# Find all buttons that exactly match value.
94
94
# @param value [String] the value to match exactly
95
95
# @return [Array<Button>]
96
- def buttons_exact value
96
+ def buttons_exact ( value )
97
97
find_elements :uiautomator , _button_exact_string ( value )
98
98
end
99
99
end # module Android
0 commit comments