@@ -7,48 +7,44 @@ module Ios
7
7
# @param value [String, Integer] the value to find.
8
8
# If int then the UIAStaticText at that index is returned.
9
9
# @return [UIAStaticText]
10
- def s_text value
10
+ def text value
11
11
return ele_index UIAStaticText , value if value . is_a? Numeric
12
12
xpath_visible_contains UIAStaticText , value
13
13
end
14
14
15
15
# Find all UIAStaticText containing value.
16
+ # If value is omitted, all UIAStaticTexts are returned
16
17
# @param value [String] the value to search for
17
18
# @return [Array<UIAStaticText>]
18
- def s_texts value
19
+ def texts value = false
20
+ return tags UIAStaticText unless value
19
21
xpaths_visible_contains UIAStaticText , value
20
22
end
21
23
22
24
# Find the first UIAStaticText.
23
25
# @return [UIAStaticText]
24
- def first_s_text
26
+ def first_text
25
27
first_ele UIAStaticText
26
28
end
27
29
28
30
# Find the last UIAStaticText.
29
31
# @return [UIAStaticText]
30
- def last_s_text
32
+ def last_text
31
33
last_ele UIAStaticText
32
34
end
33
35
34
36
# Find the first UIAStaticText that exactly matches value.
35
37
# @param value [String] the value to match exactly
36
38
# @return [UIAStaticText]
37
- def s_text_exact value
39
+ def text_exact value
38
40
xpath_visible_exact UIAStaticText , value
39
41
end
40
42
41
43
# Find all UIAStaticTexts that exactly match value.
42
44
# @param value [String] the value to match exactly
43
45
# @return [Array<UIAStaticText>]
44
- def s_texts_exact value
46
+ def texts_exact value
45
47
xpaths_visible_exact UIAStaticText , value
46
48
end
47
-
48
- # Find all UIAStaticTexts.
49
- # @return [Array<UIAStaticText>]
50
- def e_s_texts
51
- tags UIAStaticText
52
- end
53
49
end # module Ios
54
50
end # module Appium
0 commit comments