File tree 2 files changed +10
-8
lines changed
lib/appium_lib/android/element
2 files changed +10
-8
lines changed Original file line number Diff line number Diff line change @@ -80,7 +80,9 @@ def texts text
80
80
# @param name [String] the name to search for
81
81
# @return [Element] the first matching element
82
82
def name name
83
- @driver . find_element :name , name
83
+ # work around https://github.com/appium/appium/issues/543
84
+ # @driver.find_element :name, name
85
+ mobile :find , [ [ [ 7 , name ] ] ]
84
86
end
85
87
86
88
# Return all elements matching name.
Original file line number Diff line number Diff line change @@ -26,18 +26,18 @@ def last_textfield
26
26
last_ele :textfield
27
27
end
28
28
29
- # Get the first textfield that matches text.
30
- # @param text [String, Integer] the text to match exactly . If int then the textfield at that index is returned.
29
+ # Get the first textfield that includes text.
30
+ # @param text [String, Integer] the text to search for . If int then the textfield at that index is returned.
31
31
# @return [Textfield]
32
32
def textfield text
33
33
return ele_index :textfield , text if text . is_a? Numeric
34
- find_ele_by_text :textfield , text
34
+ find_ele_by_text_include :textfield , text
35
35
end
36
36
37
- # Get the first textfield that includes text.
38
- # @param text [String] the text the textfield must include
37
+ # Get the first textfield that matches text.
38
+ # @param text [String] the text to match
39
39
# @return [Textfield]
40
- def textfield_include text
41
- find_ele_by_text_include :textfield , text
40
+ def textfield_exact text
41
+ find_ele_by_text :textfield , text
42
42
end
43
43
end # module Appium::Android
You can’t perform that action at this time.
0 commit comments