2
2
module Appium
3
3
module Ios
4
4
UIAStaticText = 'UIAStaticText'
5
- # Get an array of text elements.
6
- # @return [Array<Text>]
7
- def e_s_texts
8
- tags UIAStaticText
5
+
6
+ # Get the first element that includes text.
7
+ # @param value [String, Integer] the value to find. If int then the text at that index is returned.
8
+ # @return [Text]
9
+ def s_text value
10
+ return ele_index :text , value if value . is_a? Numeric
11
+ xpath_visible_contains UIAStaticText , value
12
+ end
13
+
14
+ def s_texts value
15
+ xpaths_visible_contains UIAStaticText , value
9
16
end
10
17
11
18
# Get the first text element.
@@ -20,18 +27,6 @@ def last_s_text
20
27
last_ele UIAStaticText
21
28
end
22
29
23
- # Get the first element that includes text.
24
- # @param value [String, Integer] the value to find. If int then the text at that index is returned.
25
- # @return [Text]
26
- def s_text value
27
- return ele_index :text , value if value . is_a? Numeric
28
- xpath_visible_contains UIAStaticText , value
29
- end
30
-
31
- def s_texts value
32
- xpaths_visible_contains UIAStaticText , value
33
- end
34
-
35
30
# Get the first textfield that matches text.
36
31
# @param value [String] the value that the tag must match
37
32
# @return [Text]
@@ -45,5 +40,11 @@ def s_text_exact value
45
40
def s_texts_exact value
46
41
xpaths_visible_exact UIAStaticText , value
47
42
end
43
+
44
+ # Get an array of text elements.
45
+ # @return [Array<Text>]
46
+ def e_s_texts
47
+ tags UIAStaticText
48
+ end
48
49
end # module Common
49
50
end # module Appium
0 commit comments