File tree 1 file changed +10
-1
lines changed
lib/appium_lib/ios/element
1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,15 @@ def texts text
116
116
# Return the first element matching name.
117
117
# on Android name is content description
118
118
# 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
+ #
119
128
# @param name [String] the name to search for
120
129
# @return [Element] the first matching element
121
130
def name name
@@ -153,4 +162,4 @@ def names name
153
162
def escape_single_quote text_to_escape
154
163
text_to_escape . gsub ( "'" , '\\' * 4 + "'" )
155
164
end
156
- end # module Appium::Ios
165
+ end # module Appium::Ios
You can’t perform that action at this time.
0 commit comments