Skip to content

Commit 8810bbe

Browse files
Update name doc for iOS
1 parent f08854a commit 8810bbe

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

lib/appium_lib/ios/element/generic.rb

+10-1
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,15 @@ def texts text
116116
# Return the first element matching name.
117117
# on Android name is content description
118118
# on iOS name is the accessibility label or the text.
119+
#
120+
# ```ruby
121+
# # find element with name or label containing example and access the name attribute.
122+
# name('example').name
123+
#
124+
# # find element with name or label containing example and access the label attribute.
125+
# name('example').label
126+
# ```
127+
#
119128
# @param name [String] the name to search for
120129
# @return [Element] the first matching element
121130
def name name
@@ -153,4 +162,4 @@ def names name
153162
def escape_single_quote text_to_escape
154163
text_to_escape.gsub("'", '\\' * 4 + "'")
155164
end
156-
end # module Appium::Ios
165+
end # module Appium::Ios

0 commit comments

Comments
 (0)