Skip to content

Commit f1d2701

Browse files
names on Android will return the text values when no arg is passed
1 parent 7ac38c9 commit f1d2701

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

lib/appium_lib/android/element/generic.rb

+9-4
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,15 @@ def name_exact name
112112
# on iOS name is the accessibility label or the text.
113113
# @param name [String] the name to search for
114114
# @return [Array<Element>] all matching elements
115-
def names name
116-
args = 'all',
117-
[ [7, name] ]
118-
mobile :find, args
115+
def names name=''
116+
if name.nil? || name.empty?
117+
args = 'all', [ [7, ''], [100] ]
118+
mobile :find, args
119+
else
120+
args = 'all',
121+
[ [7, name] ]
122+
mobile :find, args
123+
end
119124
end
120125

121126
# Scroll to an element containing target text or description.

0 commit comments

Comments
 (0)