appium_lib 9.16.0 → 9.16.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -1
- data/appium_lib.gemspec +1 -1
- data/docs/android_docs.md +1128 -377
- data/docs/ios_docs.md +1527 -510
- data/lib/appium_lib/driver.rb +2 -3
- data/lib/appium_lib/ios/xcuitest/command/source.rb +0 -1
- data/lib/appium_lib/version.rb +2 -2
- data/readme.md +3 -3
- data/release_notes.md +9 -0
- metadata +4 -4
data/docs/ios_docs.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
##### [load_settings](https://github.com/appium/ruby_lib/blob/
|
1
|
+
##### [load_settings](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/appium.rb#L46) common
|
2
2
|
|
3
3
|
> def load_settings(opts = {})
|
4
4
|
|
@@ -17,11 +17,17 @@ port = 8080
|
|
17
17
|
:require is expanded
|
18
18
|
all keys are converted to symbols
|
19
19
|
|
20
|
-
__Parameters:__
|
20
|
+
__Parameters:__
|
21
21
|
|
22
|
-
|
22
|
+
[Hash] opts - file: '/path/to/appium.txt', verbose: true
|
23
23
|
|
24
|
-
|
24
|
+
__Returns:__
|
25
|
+
|
26
|
+
[hash] the symbolized hash with updated :app and :require keys
|
27
|
+
|
28
|
+
--
|
29
|
+
|
30
|
+
##### [load_appium_txt](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/appium.rb#L82) common
|
25
31
|
|
26
32
|
> def load_settings(opts = {})
|
27
33
|
|
@@ -40,23 +46,35 @@ port = 8080
|
|
40
46
|
:require is expanded
|
41
47
|
all keys are converted to symbols
|
42
48
|
|
43
|
-
__Parameters:__
|
49
|
+
__Parameters:__
|
50
|
+
|
51
|
+
[Hash] opts - file: '/path/to/appium.txt', verbose: true
|
44
52
|
|
45
|
-
__Returns:__
|
53
|
+
__Returns:__
|
46
54
|
|
47
|
-
|
55
|
+
[hash] the symbolized hash with updated :app and :require keys
|
56
|
+
|
57
|
+
--
|
58
|
+
|
59
|
+
##### [expand_required_files](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/appium.rb#L87) common
|
48
60
|
|
49
61
|
> def expand_required_files(base_dir, file_paths)
|
50
62
|
|
51
63
|
|
52
64
|
|
53
|
-
__Parameters:__
|
65
|
+
__Parameters:__
|
66
|
+
|
67
|
+
[String] base_dir - parent directory of loaded appium.txt (toml)
|
54
68
|
|
55
69
|
[String] file_paths -
|
56
70
|
|
57
|
-
__Returns:__
|
71
|
+
__Returns:__
|
72
|
+
|
73
|
+
[Array] list of require files as an array, nil if require doesn't exist
|
58
74
|
|
59
|
-
|
75
|
+
--
|
76
|
+
|
77
|
+
##### [promote_singleton_appium_methods](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/appium.rb#L129) common
|
60
78
|
|
61
79
|
> def promote_singleton_appium_methods(modules, driver = $driver)
|
62
80
|
|
@@ -72,11 +90,15 @@ if modules is a module instead of an array, then the constants of
|
|
72
90
|
that module are promoted on.
|
73
91
|
otherwise, the array of modules will be used as the promotion target.
|
74
92
|
|
75
|
-
__Parameters:__
|
93
|
+
__Parameters:__
|
94
|
+
|
95
|
+
[Array<Module>] modules - An array of modules
|
76
96
|
|
77
97
|
[Driver] driver - A driver to extend for
|
78
98
|
|
79
|
-
|
99
|
+
--
|
100
|
+
|
101
|
+
##### [promote_appium_methods](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/appium.rb#L185) common
|
80
102
|
|
81
103
|
> def promote_appium_methods(class_array, driver = $driver)
|
82
104
|
|
@@ -86,222 +108,306 @@ To promote methods to all classes:
|
|
86
108
|
|
87
109
|
It's better to promote on specific classes instead of Object
|
88
110
|
|
89
|
-
__Parameters:__
|
111
|
+
__Parameters:__
|
112
|
+
|
113
|
+
[Array<Class>] class_array - An array of classes
|
90
114
|
|
91
115
|
[Driver] driver - A driver to extend for
|
92
116
|
|
93
|
-
|
117
|
+
--
|
118
|
+
|
119
|
+
##### [global_webdriver_http_sleep](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L37) common
|
94
120
|
|
95
121
|
> def global_webdriver_http_sleep
|
96
122
|
|
97
123
|
The amount to sleep in seconds before every webdriver http call.
|
98
124
|
|
99
|
-
|
125
|
+
--
|
126
|
+
|
127
|
+
##### [global_webdriver_http_sleep=](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L37) common
|
100
128
|
|
101
129
|
> def global_webdriver_http_sleep=(value)
|
102
130
|
|
103
131
|
The amount to sleep in seconds before every webdriver http call.
|
104
132
|
|
105
|
-
|
133
|
+
--
|
134
|
+
|
135
|
+
##### [sauce](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L40) common
|
106
136
|
|
107
137
|
> def sauce
|
108
138
|
|
109
139
|
SauceLab's settings
|
110
140
|
|
111
|
-
|
141
|
+
--
|
142
|
+
|
143
|
+
##### [sauce_username](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L43) common
|
112
144
|
|
113
145
|
> def sauce_username
|
114
146
|
|
115
147
|
Username for use on Sauce Labs. Set `false` to disable Sauce, even when SAUCE_USERNAME is in ENV.
|
116
148
|
same as @sauce.username
|
117
149
|
|
118
|
-
|
150
|
+
--
|
151
|
+
|
152
|
+
##### [sauce_access_key](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L46) common
|
119
153
|
|
120
154
|
> def sauce_access_key
|
121
155
|
|
122
156
|
Access Key for use on Sauce Labs. Set `false` to disable Sauce, even when SAUCE_ACCESS_KEY is in ENV.
|
123
157
|
same as @sauce.access_key
|
124
158
|
|
125
|
-
|
159
|
+
--
|
160
|
+
|
161
|
+
##### [sauce_endpoint](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L49) common
|
126
162
|
|
127
163
|
> def sauce_endpoint
|
128
164
|
|
129
165
|
Override the Sauce Appium endpoint to allow e.g. TestObject tests
|
130
166
|
same as @sauce.endpoint
|
131
167
|
|
132
|
-
|
168
|
+
--
|
169
|
+
|
170
|
+
##### [caps](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L53) common
|
133
171
|
|
134
172
|
> def caps
|
135
173
|
|
136
174
|
from Core
|
137
175
|
read http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Driver
|
138
176
|
|
139
|
-
|
177
|
+
--
|
178
|
+
|
179
|
+
##### [custom_url](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L54) common
|
140
180
|
|
141
181
|
> def custom_url
|
142
182
|
|
143
183
|
Returns the value of attribute custom_url
|
144
184
|
|
145
|
-
|
185
|
+
--
|
186
|
+
|
187
|
+
##### [export_session](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L55) common
|
146
188
|
|
147
189
|
> def export_session
|
148
190
|
|
149
191
|
Returns the value of attribute export_session
|
150
192
|
|
151
|
-
|
193
|
+
--
|
194
|
+
|
195
|
+
##### [export_session_path](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L56) common
|
152
196
|
|
153
197
|
> def export_session_path
|
154
198
|
|
155
199
|
Returns the value of attribute export_session_path
|
156
200
|
|
157
|
-
|
201
|
+
--
|
202
|
+
|
203
|
+
##### [default_wait](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L57) common
|
158
204
|
|
159
205
|
> def default_wait
|
160
206
|
|
161
207
|
Returns the value of attribute default_wait
|
162
208
|
|
163
|
-
|
209
|
+
--
|
210
|
+
|
211
|
+
##### [appium_port](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L58) common
|
164
212
|
|
165
213
|
> def appium_port
|
166
214
|
|
167
215
|
Returns the value of attribute appium_port
|
168
216
|
|
169
|
-
|
217
|
+
--
|
218
|
+
|
219
|
+
##### [appium_device](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L59) common
|
170
220
|
|
171
221
|
> def appium_device
|
172
222
|
|
173
223
|
Returns the value of attribute appium_device
|
174
224
|
|
175
|
-
|
225
|
+
--
|
226
|
+
|
227
|
+
##### [automation_name](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L60) common
|
176
228
|
|
177
229
|
> def automation_name
|
178
230
|
|
179
231
|
Returns the value of attribute automation_name
|
180
232
|
|
181
|
-
|
233
|
+
--
|
234
|
+
|
235
|
+
##### [listener](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L61) common
|
182
236
|
|
183
237
|
> def listener
|
184
238
|
|
185
239
|
Returns the value of attribute listener
|
186
240
|
|
187
|
-
|
241
|
+
--
|
242
|
+
|
243
|
+
##### [http_client](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L62) common
|
188
244
|
|
189
245
|
> def http_client
|
190
246
|
|
191
247
|
Returns the value of attribute http_client
|
192
248
|
|
193
|
-
|
249
|
+
--
|
250
|
+
|
251
|
+
##### [appium_wait_timeout](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L63) common
|
194
252
|
|
195
253
|
> def appium_wait_timeout
|
196
254
|
|
197
255
|
Returns the value of attribute appium_wait_timeout
|
198
256
|
|
199
|
-
|
257
|
+
--
|
258
|
+
|
259
|
+
##### [appium_wait_interval](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L64) common
|
200
260
|
|
201
261
|
> def appium_wait_interval
|
202
262
|
|
203
263
|
Returns the value of attribute appium_wait_interval
|
204
264
|
|
205
|
-
|
265
|
+
--
|
266
|
+
|
267
|
+
##### [appium_server_status](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L67) common
|
206
268
|
|
207
269
|
> def appium_server_status
|
208
270
|
|
209
271
|
Appium's server version
|
210
272
|
|
211
|
-
|
273
|
+
--
|
274
|
+
|
275
|
+
##### [appium_debug](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L69) common
|
212
276
|
|
213
277
|
> def appium_debug
|
214
278
|
|
215
279
|
Boolean debug mode for the Appium Ruby bindings
|
216
280
|
|
217
|
-
|
281
|
+
--
|
282
|
+
|
283
|
+
##### [driver](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L72) common
|
218
284
|
|
219
285
|
> def driver
|
220
286
|
|
221
287
|
Returns the driver
|
222
288
|
|
223
|
-
__Returns:__
|
289
|
+
__Returns:__
|
290
|
+
|
291
|
+
[Driver] the driver
|
224
292
|
|
225
|
-
|
293
|
+
--
|
294
|
+
|
295
|
+
##### [core](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L74) common
|
226
296
|
|
227
297
|
> def core
|
228
298
|
|
229
299
|
Instance of Appium::Core::Driver
|
230
300
|
|
231
|
-
|
301
|
+
--
|
302
|
+
|
303
|
+
##### [initialize](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L142) common
|
232
304
|
|
233
305
|
> def initialize(opts = {}, global_driver = nil)
|
234
306
|
|
235
307
|
Creates a new driver. The driver is defined as global scope by default.
|
236
308
|
We can avoid defining global driver.
|
237
309
|
|
238
|
-
__Parameters:__
|
310
|
+
__Parameters:__
|
311
|
+
|
312
|
+
[Object] opts - A hash containing various options.
|
239
313
|
|
240
314
|
[Bool] global_driver - A bool require global driver before initialize.
|
241
315
|
|
242
|
-
__Returns:__
|
316
|
+
__Returns:__
|
317
|
+
|
318
|
+
[Driver]
|
243
319
|
|
244
|
-
|
320
|
+
--
|
321
|
+
|
322
|
+
##### [driver_attributes](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L256) common
|
245
323
|
|
246
324
|
> def driver_attributes
|
247
325
|
|
248
326
|
Returns a hash of the driver attributes
|
249
327
|
|
250
|
-
|
328
|
+
--
|
329
|
+
|
330
|
+
##### [device_is_android?](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L278) common
|
251
331
|
|
252
332
|
> def device_is_android?
|
253
333
|
|
254
334
|
|
255
335
|
|
256
|
-
__Returns:__
|
336
|
+
__Returns:__
|
257
337
|
|
258
|
-
|
338
|
+
[Boolean]
|
339
|
+
|
340
|
+
--
|
341
|
+
|
342
|
+
##### [device_is_ios?](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L282) common
|
259
343
|
|
260
344
|
> def device_is_ios?
|
261
345
|
|
262
346
|
|
263
347
|
|
264
|
-
__Returns:__
|
348
|
+
__Returns:__
|
349
|
+
|
350
|
+
[Boolean]
|
351
|
+
|
352
|
+
--
|
265
353
|
|
266
|
-
|
354
|
+
##### [device_is_windows?](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L286) common
|
267
355
|
|
268
356
|
> def device_is_windows?
|
269
357
|
|
270
358
|
|
271
359
|
|
272
|
-
__Returns:__
|
360
|
+
__Returns:__
|
273
361
|
|
274
|
-
|
362
|
+
[Boolean]
|
363
|
+
|
364
|
+
--
|
365
|
+
|
366
|
+
##### [automation_name_is_uiautomator2?](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L292) common
|
275
367
|
|
276
368
|
> def automation_name_is_uiautomator2?
|
277
369
|
|
278
370
|
Return true if automationName is 'uiautomator2'
|
279
371
|
|
280
|
-
__Returns:__
|
372
|
+
__Returns:__
|
373
|
+
|
374
|
+
[Boolean]
|
375
|
+
|
376
|
+
--
|
281
377
|
|
282
|
-
|
378
|
+
##### [automation_name_is_espresso?](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L298) common
|
283
379
|
|
284
380
|
> def automation_name_is_espresso?
|
285
381
|
|
286
382
|
Return true if automationName is 'Espresso'
|
287
383
|
|
288
|
-
__Returns:__
|
384
|
+
__Returns:__
|
289
385
|
|
290
|
-
|
386
|
+
[Boolean]
|
387
|
+
|
388
|
+
--
|
389
|
+
|
390
|
+
##### [automation_name_is_xcuitest?](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L304) common
|
291
391
|
|
292
392
|
> def automation_name_is_xcuitest?
|
293
393
|
|
294
394
|
Return true if automationName is 'XCUITest'
|
295
395
|
|
296
|
-
__Returns:__
|
396
|
+
__Returns:__
|
397
|
+
|
398
|
+
[Boolean]
|
399
|
+
|
400
|
+
--
|
297
401
|
|
298
|
-
|
402
|
+
##### [dialect](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L324) common
|
299
403
|
|
300
404
|
> def dialect
|
301
405
|
|
302
406
|
Get the dialect value whether current driver is OSS or W3C
|
303
407
|
|
304
|
-
__Returns:__
|
408
|
+
__Returns:__
|
409
|
+
|
410
|
+
[:oss | :w3c] @example
|
305
411
|
|
306
412
|
if dialect == :w3c
|
307
413
|
driver.action
|
@@ -313,48 +419,70 @@ __Returns:__\n\n [:oss | :w3c] @example
|
|
313
419
|
action.perform
|
314
420
|
end
|
315
421
|
|
316
|
-
|
422
|
+
--
|
423
|
+
|
424
|
+
##### [check_server_version_xcuitest](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L331) common
|
317
425
|
|
318
426
|
> def check_server_version_xcuitest
|
319
427
|
|
320
428
|
Return true if the target Appium server is over REQUIRED_VERSION_XCUITEST.
|
321
429
|
If the Appium server is under REQUIRED_VERSION_XCUITEST, then error is raised.
|
322
430
|
|
323
|
-
__Returns:__
|
431
|
+
__Returns:__
|
432
|
+
|
433
|
+
[Boolean]
|
434
|
+
|
435
|
+
--
|
324
436
|
|
325
|
-
|
437
|
+
##### [appium_server_version](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L352) common
|
326
438
|
|
327
439
|
> def appium_server_version
|
328
440
|
|
329
441
|
Returns the server's version info
|
330
442
|
|
331
|
-
__Returns:__
|
443
|
+
__Returns:__
|
332
444
|
|
333
|
-
|
445
|
+
[Hash]
|
446
|
+
|
447
|
+
--
|
448
|
+
|
449
|
+
##### [remote_status](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L360) common
|
334
450
|
|
335
451
|
> def appium_server_version
|
336
452
|
|
337
453
|
Returns the server's version info
|
338
454
|
|
339
|
-
__Returns:__
|
455
|
+
__Returns:__
|
456
|
+
|
457
|
+
[Hash]
|
458
|
+
|
459
|
+
--
|
340
460
|
|
341
|
-
|
461
|
+
##### [platform_version](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L364) common
|
342
462
|
|
343
463
|
> def platform_version
|
344
464
|
|
345
465
|
Return the platform version as an array of integers
|
346
466
|
|
347
|
-
__Returns:__
|
467
|
+
__Returns:__
|
348
468
|
|
349
|
-
|
469
|
+
[Array<Integer>]
|
470
|
+
|
471
|
+
--
|
472
|
+
|
473
|
+
##### [appium_client_version](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L377) common
|
350
474
|
|
351
475
|
> def appium_client_version
|
352
476
|
|
353
477
|
Returns the client's version info
|
354
478
|
|
355
|
-
__Returns:__
|
479
|
+
__Returns:__
|
480
|
+
|
481
|
+
[Hash]
|
482
|
+
|
483
|
+
--
|
356
484
|
|
357
|
-
|
485
|
+
##### [absolute_app_path](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L389) common
|
358
486
|
|
359
487
|
> def self.absolute_app_path(opts)
|
360
488
|
|
@@ -365,71 +493,107 @@ then the app path is used as is.
|
|
365
493
|
|
366
494
|
if app isn't set then an error is raised.
|
367
495
|
|
368
|
-
__Returns:__
|
496
|
+
__Returns:__
|
369
497
|
|
370
|
-
|
498
|
+
[String] APP_PATH as an absolute path
|
499
|
+
|
500
|
+
--
|
501
|
+
|
502
|
+
##### [server_url](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L412) common
|
371
503
|
|
372
504
|
> def server_url
|
373
505
|
|
374
506
|
Get the server url
|
375
507
|
|
376
|
-
__Returns:__
|
508
|
+
__Returns:__
|
509
|
+
|
510
|
+
[String] the server url
|
511
|
+
|
512
|
+
--
|
377
513
|
|
378
|
-
|
514
|
+
##### [restart](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L421) common
|
379
515
|
|
380
516
|
> def restart
|
381
517
|
|
382
518
|
Restarts the driver
|
383
519
|
|
384
|
-
__Returns:__
|
520
|
+
__Returns:__
|
385
521
|
|
386
|
-
|
522
|
+
[Driver] the driver
|
523
|
+
|
524
|
+
--
|
525
|
+
|
526
|
+
##### [screenshot](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L434) common
|
387
527
|
|
388
528
|
> def screenshot(png_save_path)
|
389
529
|
|
390
530
|
Takes a png screenshot and saves to the target path.
|
391
531
|
|
392
|
-
__Parameters:__
|
532
|
+
__Parameters:__
|
533
|
+
|
534
|
+
[String] png_save_path - the full path to save the png
|
535
|
+
|
536
|
+
__Returns:__
|
537
|
+
|
538
|
+
[File]
|
393
539
|
|
394
|
-
|
540
|
+
--
|
395
541
|
|
396
|
-
|
542
|
+
##### [element_screenshot](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L448) common
|
397
543
|
|
398
544
|
> def element_screenshot(element, png_save_path)
|
399
545
|
|
400
546
|
Takes a png screenshot of particular element's area
|
401
547
|
|
402
|
-
__Parameters:__
|
548
|
+
__Parameters:__
|
549
|
+
|
550
|
+
[String] element - Element take a screenshot
|
403
551
|
|
404
552
|
[String] png_save_path - the full path to save the png
|
405
553
|
|
406
|
-
__Returns:__
|
554
|
+
__Returns:__
|
555
|
+
|
556
|
+
[File]
|
407
557
|
|
408
|
-
|
558
|
+
--
|
559
|
+
|
560
|
+
##### [driver_quit](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L455) common
|
409
561
|
|
410
562
|
> def driver_quit
|
411
563
|
|
412
564
|
Quits the driver
|
413
565
|
|
414
|
-
__Returns:__
|
566
|
+
__Returns:__
|
567
|
+
|
568
|
+
[void]
|
415
569
|
|
416
|
-
|
570
|
+
--
|
571
|
+
|
572
|
+
##### [quit_driver](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L458) common
|
417
573
|
|
418
574
|
> def driver_quit
|
419
575
|
|
420
576
|
Quits the driver
|
421
577
|
|
422
|
-
__Returns:__
|
578
|
+
__Returns:__
|
579
|
+
|
580
|
+
[void]
|
423
581
|
|
424
|
-
|
582
|
+
--
|
583
|
+
|
584
|
+
##### [window_size](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L469) common
|
425
585
|
|
426
586
|
> def window_size
|
427
587
|
|
428
588
|
Get the device window's size.
|
429
589
|
|
430
|
-
__Returns:__
|
590
|
+
__Returns:__
|
591
|
+
|
592
|
+
[Selenium::WebDriver::Dimension]
|
431
593
|
|
432
|
-
|
594
|
+
--
|
595
|
+
|
596
|
+
##### [start_driver](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L502) common
|
433
597
|
|
434
598
|
> def start_driver(http_client_ops =
|
435
599
|
|
@@ -439,33 +603,49 @@ You can customise http_client as the following
|
|
439
603
|
Read http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device to understand more what the driver
|
440
604
|
can call instance methods.
|
441
605
|
|
442
|
-
__Parameters:__
|
606
|
+
__Parameters:__
|
607
|
+
|
608
|
+
[Hash] http_client_ops - a customizable set of options
|
443
609
|
|
444
|
-
__Returns:__
|
610
|
+
__Returns:__
|
445
611
|
|
446
|
-
|
612
|
+
[Selenium::WebDriver] the new global driver
|
613
|
+
|
614
|
+
--
|
615
|
+
|
616
|
+
##### [set_implicit_wait](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L524) common
|
447
617
|
|
448
618
|
> def set_implicit_wait(wait)
|
449
619
|
|
450
620
|
To ignore error for Espresso Driver
|
451
621
|
|
452
|
-
|
622
|
+
--
|
623
|
+
|
624
|
+
##### [no_wait](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L535) common
|
453
625
|
|
454
626
|
> def no_wait
|
455
627
|
|
456
628
|
Set implicit wait to zero.
|
457
629
|
|
458
|
-
|
630
|
+
--
|
631
|
+
|
632
|
+
##### [set_wait](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L549) common
|
459
633
|
|
460
634
|
> def set_wait(timeout = nil)
|
461
635
|
|
462
636
|
Set implicit wait. Default to @core.default_wait.
|
463
637
|
|
464
|
-
__Parameters:__
|
638
|
+
__Parameters:__
|
465
639
|
|
466
|
-
|
640
|
+
[Integer] timeout - the timeout in seconds
|
467
641
|
|
468
|
-
|
642
|
+
__Returns:__
|
643
|
+
|
644
|
+
[void]
|
645
|
+
|
646
|
+
--
|
647
|
+
|
648
|
+
##### [exists](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L566) common
|
469
649
|
|
470
650
|
> def exists(pre_check = 0, post_check = @core.default_wait)
|
471
651
|
|
@@ -475,27 +655,39 @@ Example:
|
|
475
655
|
|
476
656
|
exists { button('sign in') } ? puts('true') : puts('false')
|
477
657
|
|
478
|
-
__Parameters:__
|
658
|
+
__Parameters:__
|
659
|
+
|
660
|
+
[Integer] pre_check - The amount in seconds to set the
|
479
661
|
wait to before checking existence
|
480
662
|
|
481
663
|
[Integer] post_check - The amount in seconds to set the
|
482
664
|
wait to after checking existence
|
483
665
|
|
484
|
-
__Returns:__
|
666
|
+
__Returns:__
|
485
667
|
|
486
|
-
|
668
|
+
[Boolean]
|
669
|
+
|
670
|
+
--
|
671
|
+
|
672
|
+
##### [execute_script](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L590) common
|
487
673
|
|
488
674
|
> def execute_script(script, *args)
|
489
675
|
|
490
676
|
The same as @driver.execute_script
|
491
677
|
|
492
|
-
__Parameters:__
|
678
|
+
__Parameters:__
|
679
|
+
|
680
|
+
[String] script - The script to execute
|
493
681
|
|
494
682
|
[*args] args - The args to pass to the script
|
495
683
|
|
496
|
-
__Returns:__
|
684
|
+
__Returns:__
|
685
|
+
|
686
|
+
[Object]
|
497
687
|
|
498
|
-
|
688
|
+
--
|
689
|
+
|
690
|
+
##### [execute_async_script](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L598) common
|
499
691
|
|
500
692
|
> def execute_async_script(script, *args)
|
501
693
|
|
@@ -503,57 +695,77 @@ Wrap calling selenium webdrier APIs via ruby_core
|
|
503
695
|
|
504
696
|
Get the window handles of open browser windows
|
505
697
|
|
506
|
-
|
698
|
+
--
|
699
|
+
|
700
|
+
##### [window_handles](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L602) common
|
507
701
|
|
508
702
|
> def window_handles
|
509
703
|
|
510
704
|
|
511
705
|
|
512
|
-
|
706
|
+
--
|
707
|
+
|
708
|
+
##### [window_handle](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L607) common
|
513
709
|
|
514
710
|
> def window_handle
|
515
711
|
|
516
712
|
Get the current window handle
|
517
713
|
|
518
|
-
|
714
|
+
--
|
715
|
+
|
716
|
+
##### [navigate](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L611) common
|
519
717
|
|
520
718
|
> def navigate
|
521
719
|
|
522
720
|
|
523
721
|
|
524
|
-
|
722
|
+
--
|
723
|
+
|
724
|
+
##### [manage](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L615) common
|
525
725
|
|
526
726
|
> def manage
|
527
727
|
|
528
728
|
|
529
729
|
|
530
|
-
|
730
|
+
--
|
731
|
+
|
732
|
+
##### [get](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L619) common
|
531
733
|
|
532
734
|
> def get(url)
|
533
735
|
|
534
736
|
|
535
737
|
|
536
|
-
|
738
|
+
--
|
739
|
+
|
740
|
+
##### [current_url](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L623) common
|
537
741
|
|
538
742
|
> def current_url
|
539
743
|
|
540
744
|
|
541
745
|
|
542
|
-
|
746
|
+
--
|
747
|
+
|
748
|
+
##### [title](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L627) common
|
543
749
|
|
544
750
|
> def title
|
545
751
|
|
546
752
|
|
547
753
|
|
548
|
-
|
754
|
+
--
|
755
|
+
|
756
|
+
##### [switch_to](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L633) common
|
549
757
|
|
550
758
|
> def switch_to
|
551
759
|
|
552
760
|
|
553
761
|
|
554
|
-
__Returns:__
|
762
|
+
__Returns:__
|
763
|
+
|
764
|
+
[TargetLocator]
|
555
765
|
|
556
|
-
|
766
|
+
--
|
767
|
+
|
768
|
+
##### [find_elements](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L660) common
|
557
769
|
|
558
770
|
> def find_elements(*args)
|
559
771
|
|
@@ -563,11 +775,17 @@ If you call `Appium.promote_appium_methods`, you can call `find_elements` direct
|
|
563
775
|
|
564
776
|
If you call `Appium.promote_appium_methods`, you can call `find_elements` directly.
|
565
777
|
|
566
|
-
__Parameters:__
|
778
|
+
__Parameters:__
|
779
|
+
|
780
|
+
[*args] args - The args to use
|
567
781
|
|
568
|
-
__Returns:__
|
782
|
+
__Returns:__
|
569
783
|
|
570
|
-
|
784
|
+
[Array<Element>] Array is empty when no elements are found.
|
785
|
+
|
786
|
+
--
|
787
|
+
|
788
|
+
##### [find_element](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L676) common
|
571
789
|
|
572
790
|
> def find_element(*args)
|
573
791
|
|
@@ -575,128 +793,188 @@ Calls @driver.find_element
|
|
575
793
|
|
576
794
|
If you call `Appium.promote_appium_methods`, you can call `find_element` directly.
|
577
795
|
|
578
|
-
__Parameters:__
|
796
|
+
__Parameters:__
|
797
|
+
|
798
|
+
[*args] args - The args to use
|
799
|
+
|
800
|
+
__Returns:__
|
579
801
|
|
580
|
-
|
802
|
+
[Element]
|
581
803
|
|
582
|
-
|
804
|
+
--
|
805
|
+
|
806
|
+
##### [DEFAULT_MATCH_THRESHOLD](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L694) common
|
583
807
|
|
584
808
|
> DEFAULT_MATCH_THRESHOLD = 0.5
|
585
809
|
|
586
810
|
Return ImageElement if current view has a partial image
|
587
811
|
|
588
|
-
__Parameters:__
|
812
|
+
__Parameters:__
|
813
|
+
|
814
|
+
[String] png_img_path - A path to a partial image you'd like to find
|
589
815
|
|
590
816
|
[Flood] match_threshold - At what normalized threshold to reject
|
591
817
|
|
592
818
|
[Bool] visualize - Makes the endpoint to return an image, which contains the visualized result of
|
593
819
|
the corresponding picture matching operation. This option is disabled by default.
|
594
820
|
|
595
|
-
__Returns:__
|
821
|
+
__Returns:__
|
822
|
+
|
823
|
+
[::Appium::Core::ImageElement]
|
824
|
+
|
825
|
+
--
|
596
826
|
|
597
|
-
|
827
|
+
##### [find_element_by_image](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L695) common
|
598
828
|
|
599
829
|
> def find_element_by_image(png_img_path, match_threshold: DEFAULT_MATCH_THRESHOLD, visualize: false)
|
600
830
|
|
601
831
|
|
602
832
|
|
603
|
-
|
833
|
+
--
|
834
|
+
|
835
|
+
##### [find_elements_by_image](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L713) common
|
604
836
|
|
605
837
|
> def find_elements_by_image(png_img_paths, match_threshold: DEFAULT_MATCH_THRESHOLD, visualize: false)
|
606
838
|
|
607
839
|
Return ImageElement if current view has partial images
|
608
840
|
|
609
|
-
__Parameters:__
|
841
|
+
__Parameters:__
|
842
|
+
|
843
|
+
[[String]] png_img_paths - Paths to a partial image you'd like to find
|
610
844
|
|
611
845
|
[Flood] match_threshold - At what normalized threshold to reject
|
612
846
|
|
613
847
|
[Bool] visualize - Makes the endpoint to return an image, which contains the visualized result of
|
614
848
|
the corresponding picture matching operation. This option is disabled by default.
|
615
849
|
|
616
|
-
__Returns:__
|
850
|
+
__Returns:__
|
851
|
+
|
852
|
+
[[::Appium::Core::ImageElement]]
|
853
|
+
|
854
|
+
--
|
617
855
|
|
618
|
-
|
856
|
+
##### [set_location](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L726) common
|
619
857
|
|
620
858
|
> def set_location(opts = {})
|
621
859
|
|
622
860
|
Calls @driver.set_location
|
623
861
|
|
624
|
-
__Parameters:__
|
862
|
+
__Parameters:__
|
625
863
|
|
626
|
-
|
864
|
+
[Hash] opts - consisting of:
|
627
865
|
|
628
|
-
|
866
|
+
__Returns:__
|
867
|
+
|
868
|
+
[Selenium::WebDriver::Location] the location constructed by the selenium webdriver
|
869
|
+
|
870
|
+
--
|
871
|
+
|
872
|
+
##### [x](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/driver.rb#L736) common
|
629
873
|
|
630
874
|
> def x
|
631
875
|
|
632
876
|
Quit the driver and Pry.
|
633
877
|
quit and exit are reserved by Pry.
|
634
878
|
|
635
|
-
__Returns:__
|
879
|
+
__Returns:__
|
880
|
+
|
881
|
+
[void]
|
636
882
|
|
637
|
-
|
883
|
+
--
|
884
|
+
|
885
|
+
##### [username](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/sauce_labs.rb#L4) common
|
638
886
|
|
639
887
|
> def username
|
640
888
|
|
641
889
|
Username for use on Sauce Labs. Set `false` to disable Sauce, even when SAUCE_USERNAME is in ENV.
|
642
890
|
|
643
|
-
|
891
|
+
--
|
892
|
+
|
893
|
+
##### [access_key](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/sauce_labs.rb#L6) common
|
644
894
|
|
645
895
|
> def access_key
|
646
896
|
|
647
897
|
Access Key for use on Sauce Labs. Set `false` to disable Sauce, even when SAUCE_ACCESS_KEY is in ENV.
|
648
898
|
|
649
|
-
|
899
|
+
--
|
900
|
+
|
901
|
+
##### [endpoint](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/sauce_labs.rb#L8) common
|
650
902
|
|
651
903
|
> def endpoint
|
652
904
|
|
653
905
|
Override the Sauce Appium endpoint to allow e.g. TestObject tests. Default is 'ondemand.saucelabs.com:443/wd/hub'.
|
654
906
|
|
655
|
-
|
907
|
+
--
|
908
|
+
|
909
|
+
##### [initialize](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/sauce_labs.rb#L33) common
|
656
910
|
|
657
911
|
> def initialize(appium_lib_opts)
|
658
912
|
|
659
913
|
Create a SauceLabs instance to manage sauce labs related attributes.
|
660
914
|
|
661
|
-
__Parameters:__
|
915
|
+
__Parameters:__
|
662
916
|
|
663
|
-
|
917
|
+
[Hash] appium_lib_opts - Appium library parameter
|
664
918
|
|
665
|
-
|
919
|
+
__Returns:__
|
920
|
+
|
921
|
+
[Appium::SauceLabs]
|
922
|
+
|
923
|
+
--
|
924
|
+
|
925
|
+
##### [sauce_server_url?](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/sauce_labs.rb#L53) common
|
666
926
|
|
667
927
|
> def sauce_server_url?
|
668
928
|
|
669
929
|
Return true if an instance of Appium::SauceLabs has sauce_username and sauce_access_key.
|
670
930
|
|
671
|
-
__Returns:__
|
931
|
+
__Returns:__
|
932
|
+
|
933
|
+
[Boolean]
|
672
934
|
|
673
|
-
|
935
|
+
--
|
936
|
+
|
937
|
+
##### [server_url](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/sauce_labs.rb#L66) common
|
674
938
|
|
675
939
|
> def server_url
|
676
940
|
|
677
941
|
Return a particular server url to access to. Default is the local address.
|
678
942
|
|
679
|
-
__Returns:__
|
943
|
+
__Returns:__
|
944
|
+
|
945
|
+
[String]
|
680
946
|
|
681
|
-
|
947
|
+
--
|
948
|
+
|
949
|
+
##### [get_log](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/log.rb#L11) common
|
682
950
|
|
683
951
|
> def get_log(type)
|
684
952
|
|
685
953
|
|
686
954
|
|
687
|
-
__Parameters:__
|
955
|
+
__Parameters:__
|
956
|
+
|
957
|
+
[String|Hash] type - You can get particular type's logs.
|
688
958
|
|
689
|
-
__Returns:__
|
959
|
+
__Returns:__
|
690
960
|
|
691
|
-
|
961
|
+
[[Selenium::WebDriver::LogEntry]] A list of logs data.
|
962
|
+
|
963
|
+
--
|
964
|
+
|
965
|
+
##### [get_available_log_types](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/log.rb#L23) common
|
692
966
|
|
693
967
|
> def get_available_log_types
|
694
968
|
|
695
969
|
Get a list of available log types
|
696
970
|
|
697
|
-
__Returns:__
|
971
|
+
__Returns:__
|
972
|
+
|
973
|
+
[[String]] A list of available log types.
|
974
|
+
|
975
|
+
--
|
698
976
|
|
699
|
-
|
977
|
+
##### [wait_true](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/wait.rb#L30) common
|
700
978
|
|
701
979
|
> def wait_true(opts = {})
|
702
980
|
|
@@ -710,9 +988,13 @@ https://github.com/SeleniumHQ/selenium/blob/cf501dda3f0ed12233de51ce8170c0e8090f
|
|
710
988
|
|
711
989
|
If only a number is provided then it's treated as the timeout value.
|
712
990
|
|
713
|
-
__Parameters:__
|
991
|
+
__Parameters:__
|
714
992
|
|
715
|
-
|
993
|
+
[Hash|Numeric] opts - Options. If the value is _Numeric_, the value is set as `{ timeout: value }`
|
994
|
+
|
995
|
+
--
|
996
|
+
|
997
|
+
##### [wait](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/wait.rb#L59) common
|
716
998
|
|
717
999
|
> def wait(opts = {})
|
718
1000
|
|
@@ -724,221 +1006,319 @@ https://github.com/SeleniumHQ/selenium/blob/cf501dda3f0ed12233de51ce8170c0e8090f
|
|
724
1006
|
|
725
1007
|
If only a number is provided then it's treated as the timeout value.
|
726
1008
|
|
727
|
-
__Parameters:__
|
1009
|
+
__Parameters:__
|
1010
|
+
|
1011
|
+
[Hash|Numeric] opts - Options. If the value is _Numeric_, the value is set as `{ timeout: value }`
|
1012
|
+
|
1013
|
+
--
|
728
1014
|
|
729
|
-
|
1015
|
+
##### [add_touch_actions](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/device.rb#L12) common
|
730
1016
|
|
731
1017
|
> def add_touch_actions
|
732
1018
|
|
733
1019
|
|
734
1020
|
|
735
|
-
|
1021
|
+
--
|
1022
|
+
|
1023
|
+
##### [delegate_from_appium_driver](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/device.rb#L24) common
|
736
1024
|
|
737
1025
|
> def delegate_from_appium_driver(method, delegation_target)
|
738
1026
|
|
739
1027
|
|
740
1028
|
|
741
|
-
|
1029
|
+
--
|
1030
|
+
|
1031
|
+
##### [ignore](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L16) common
|
742
1032
|
|
743
1033
|
> def ignore
|
744
1034
|
|
745
1035
|
Return yield and ignore any exceptions.
|
746
1036
|
|
747
|
-
|
1037
|
+
--
|
1038
|
+
|
1039
|
+
##### [back](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L23) common
|
748
1040
|
|
749
1041
|
> def back
|
750
1042
|
|
751
1043
|
Navigate back.
|
752
1044
|
|
753
|
-
__Returns:__
|
1045
|
+
__Returns:__
|
1046
|
+
|
1047
|
+
[void]
|
754
1048
|
|
755
|
-
|
1049
|
+
--
|
1050
|
+
|
1051
|
+
##### [session_id](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L34) common
|
756
1052
|
|
757
1053
|
> def session_id
|
758
1054
|
|
759
1055
|
For Sauce Labs reporting. Returns the current session id.
|
760
1056
|
|
761
|
-
__Returns:__
|
1057
|
+
__Returns:__
|
1058
|
+
|
1059
|
+
[String]
|
762
1060
|
|
763
|
-
|
1061
|
+
--
|
1062
|
+
|
1063
|
+
##### [xpath](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L42) common
|
764
1064
|
|
765
1065
|
> def xpath(xpath_str)
|
766
1066
|
|
767
1067
|
Returns the first element that matches the provided xpath.
|
768
1068
|
|
769
|
-
__Parameters:__
|
1069
|
+
__Parameters:__
|
1070
|
+
|
1071
|
+
[String] xpath_str - the XPath string
|
770
1072
|
|
771
|
-
__Returns:__
|
1073
|
+
__Returns:__
|
772
1074
|
|
773
|
-
|
1075
|
+
[Element]
|
1076
|
+
|
1077
|
+
--
|
1078
|
+
|
1079
|
+
##### [xpaths](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L50) common
|
774
1080
|
|
775
1081
|
> def xpaths(xpath_str)
|
776
1082
|
|
777
1083
|
Returns all elements that match the provided xpath.
|
778
1084
|
|
779
|
-
__Parameters:__
|
1085
|
+
__Parameters:__
|
1086
|
+
|
1087
|
+
[String] xpath_str - the XPath string
|
1088
|
+
|
1089
|
+
__Returns:__
|
780
1090
|
|
781
|
-
|
1091
|
+
[Array<Element>]
|
782
1092
|
|
783
|
-
|
1093
|
+
--
|
1094
|
+
|
1095
|
+
##### [result](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L60) common
|
784
1096
|
|
785
1097
|
> def result
|
786
1098
|
|
787
1099
|
Returns the value of attribute result
|
788
1100
|
|
789
|
-
|
1101
|
+
--
|
1102
|
+
|
1103
|
+
##### [initialize](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L62) common
|
790
1104
|
|
791
1105
|
> def initialize(platform)
|
792
1106
|
|
793
1107
|
|
794
1108
|
|
795
|
-
__Returns:__
|
1109
|
+
__Returns:__
|
1110
|
+
|
1111
|
+
[CountElements] a new instance of CountElements
|
1112
|
+
|
1113
|
+
--
|
796
1114
|
|
797
|
-
|
1115
|
+
##### [reset](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L67) common
|
798
1116
|
|
799
1117
|
> def reset
|
800
1118
|
|
801
1119
|
|
802
1120
|
|
803
|
-
|
1121
|
+
--
|
1122
|
+
|
1123
|
+
##### [start_element](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L72) common
|
804
1124
|
|
805
1125
|
> def start_element(name, attrs = [])
|
806
1126
|
|
807
1127
|
http://nokogiri.org/Nokogiri/XML/SAX/Document.html
|
808
1128
|
|
809
|
-
|
1129
|
+
--
|
1130
|
+
|
1131
|
+
##### [formatted_result](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L83) common
|
810
1132
|
|
811
1133
|
> def formatted_result
|
812
1134
|
|
813
1135
|
|
814
1136
|
|
815
|
-
|
1137
|
+
--
|
1138
|
+
|
1139
|
+
##### [get_page_class](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L101) common
|
816
1140
|
|
817
1141
|
> def get_page_class
|
818
1142
|
|
819
1143
|
Returns a string of class counts of visible elements.
|
820
1144
|
|
821
|
-
__Returns:__
|
1145
|
+
__Returns:__
|
1146
|
+
|
1147
|
+
[String]
|
822
1148
|
|
823
|
-
|
1149
|
+
--
|
1150
|
+
|
1151
|
+
##### [page_class](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L126) common
|
824
1152
|
|
825
1153
|
> def page_class
|
826
1154
|
|
827
1155
|
Count all classes on screen and print to stdout.
|
828
1156
|
Useful for appium_console.
|
829
1157
|
|
830
|
-
__Returns:__
|
1158
|
+
__Returns:__
|
1159
|
+
|
1160
|
+
[nil]
|
831
1161
|
|
832
|
-
|
1162
|
+
--
|
1163
|
+
|
1164
|
+
##### [source](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L133) common
|
833
1165
|
|
834
1166
|
> def source
|
835
1167
|
|
836
1168
|
Prints xml of the current page
|
837
1169
|
|
838
|
-
__Returns:__
|
1170
|
+
__Returns:__
|
1171
|
+
|
1172
|
+
[void]
|
839
1173
|
|
840
|
-
|
1174
|
+
--
|
1175
|
+
|
1176
|
+
##### [get_source](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L140) common
|
841
1177
|
|
842
1178
|
> def get_source
|
843
1179
|
|
844
1180
|
Returns XML string for the current page
|
845
1181
|
Same as driver.page_source
|
846
1182
|
|
847
|
-
__Returns:__
|
1183
|
+
__Returns:__
|
1184
|
+
|
1185
|
+
[String]
|
848
1186
|
|
849
|
-
|
1187
|
+
--
|
1188
|
+
|
1189
|
+
##### [px_to_window_rel](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L150) common
|
850
1190
|
|
851
1191
|
> def px_to_window_rel(opts = {}, driver = $driver)
|
852
1192
|
|
853
1193
|
Converts pixel values to window relative values
|
854
1194
|
|
855
|
-
|
1195
|
+
--
|
1196
|
+
|
1197
|
+
##### [xml_keys](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L169) common
|
856
1198
|
|
857
1199
|
> def xml_keys(target)
|
858
1200
|
|
859
1201
|
Search strings.xml's values for target.
|
860
1202
|
|
861
|
-
__Parameters:__
|
1203
|
+
__Parameters:__
|
862
1204
|
|
863
|
-
|
1205
|
+
[String] target - the target to search for in strings.xml values
|
864
1206
|
|
865
|
-
|
1207
|
+
__Returns:__
|
1208
|
+
|
1209
|
+
[Array]
|
1210
|
+
|
1211
|
+
--
|
1212
|
+
|
1213
|
+
##### [xml_values](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L177) common
|
866
1214
|
|
867
1215
|
> def xml_values(target)
|
868
1216
|
|
869
1217
|
Search strings.xml's keys for target.
|
870
1218
|
|
871
|
-
__Parameters:__
|
1219
|
+
__Parameters:__
|
1220
|
+
|
1221
|
+
[String] target - the target to search for in strings.xml keys
|
872
1222
|
|
873
|
-
__Returns:__
|
1223
|
+
__Returns:__
|
874
1224
|
|
875
|
-
|
1225
|
+
[Array]
|
1226
|
+
|
1227
|
+
--
|
1228
|
+
|
1229
|
+
##### [resolve_id](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L185) common
|
876
1230
|
|
877
1231
|
> def resolve_id(id)
|
878
1232
|
|
879
1233
|
Resolve id in strings.xml and return the value.
|
880
1234
|
|
881
|
-
__Parameters:__
|
1235
|
+
__Parameters:__
|
1236
|
+
|
1237
|
+
[String] id - the id to resolve
|
1238
|
+
|
1239
|
+
__Returns:__
|
882
1240
|
|
883
|
-
|
1241
|
+
[String]
|
884
1242
|
|
885
|
-
|
1243
|
+
--
|
1244
|
+
|
1245
|
+
##### [filter](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L192) common
|
886
1246
|
|
887
1247
|
> def filter
|
888
1248
|
|
889
1249
|
Returns the value of attribute filter
|
890
1250
|
|
891
|
-
|
1251
|
+
--
|
1252
|
+
|
1253
|
+
##### [filter=](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L195) common
|
892
1254
|
|
893
1255
|
> def filter=(value)
|
894
1256
|
|
895
1257
|
convert to string to support symbols
|
896
1258
|
|
897
|
-
|
1259
|
+
--
|
1260
|
+
|
1261
|
+
##### [initialize](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L202) common
|
898
1262
|
|
899
1263
|
> def initialize
|
900
1264
|
|
901
1265
|
|
902
1266
|
|
903
|
-
__Returns:__
|
1267
|
+
__Returns:__
|
1268
|
+
|
1269
|
+
[HTMLElements] a new instance of HTMLElements
|
904
1270
|
|
905
|
-
|
1271
|
+
--
|
1272
|
+
|
1273
|
+
##### [reset](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L207) common
|
906
1274
|
|
907
1275
|
> def reset
|
908
1276
|
|
909
1277
|
|
910
1278
|
|
911
|
-
|
1279
|
+
--
|
1280
|
+
|
1281
|
+
##### [result](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L213) common
|
912
1282
|
|
913
1283
|
> def result
|
914
1284
|
|
915
1285
|
|
916
1286
|
|
917
|
-
|
1287
|
+
--
|
1288
|
+
|
1289
|
+
##### [start_element](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L226) common
|
918
1290
|
|
919
1291
|
> def start_element(name, attrs = [])
|
920
1292
|
|
921
1293
|
|
922
1294
|
|
923
|
-
|
1295
|
+
--
|
1296
|
+
|
1297
|
+
##### [end_element](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L236) common
|
924
1298
|
|
925
1299
|
> def end_element(name)
|
926
1300
|
|
927
1301
|
|
928
1302
|
|
929
|
-
|
1303
|
+
--
|
1304
|
+
|
1305
|
+
##### [characters](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/helper.rb#L243) common
|
930
1306
|
|
931
1307
|
> def characters(chars)
|
932
1308
|
|
933
1309
|
|
934
1310
|
|
935
|
-
|
1311
|
+
--
|
1312
|
+
|
1313
|
+
##### [DEFAULT_HEADERS](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/http_client.rb#L8) common
|
936
1314
|
|
937
1315
|
> DEFAULT_HEADERS = { 'Accept' => CONTENT_TYPE, 'User-Agent' => "appium/ruby_lib/#{::Appium::VERSION}" }.freeze
|
938
1316
|
|
939
1317
|
Default HTTP client inherit Appium::Core::Base::Http::Default, but has different DEFAULT_HEADERS
|
940
1318
|
|
941
|
-
|
1319
|
+
--
|
1320
|
+
|
1321
|
+
##### [pinch](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/multi_touch.rb#L51) common
|
942
1322
|
|
943
1323
|
> def pinch(percentage = 25, auto_perform = true, driver = $driver)
|
944
1324
|
|
@@ -948,13 +1328,17 @@ Without auto_perform
|
|
948
1328
|
|
949
1329
|
With driver
|
950
1330
|
|
951
|
-
__Parameters:__
|
1331
|
+
__Parameters:__
|
1332
|
+
|
1333
|
+
[int] percentage - The percent size by which to shrink the screen when pinched.
|
952
1334
|
|
953
1335
|
[boolean] auto_perform - Whether to perform the action immediately (default true)
|
954
1336
|
|
955
1337
|
[Driver] driver - Set a driver to conduct the action. DEfault is global driver($driver)
|
956
1338
|
|
957
|
-
|
1339
|
+
--
|
1340
|
+
|
1341
|
+
##### [zoom](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/multi_touch.rb#L94) common
|
958
1342
|
|
959
1343
|
> def zoom(percentage = 200, auto_perform = true, driver = $driver)
|
960
1344
|
|
@@ -964,159 +1348,231 @@ Without auto_perform
|
|
964
1348
|
|
965
1349
|
With driver
|
966
1350
|
|
967
|
-
__Parameters:__
|
1351
|
+
__Parameters:__
|
1352
|
+
|
1353
|
+
[int] percentage - The percent size by which to shrink the screen when pinched.
|
968
1354
|
|
969
1355
|
[boolean] auto_perform - Whether to perform the action immediately (default true)
|
970
1356
|
|
971
1357
|
[Driver] driver - Set a driver to conduct the action. DEfault is global driver($driver)
|
972
1358
|
|
973
|
-
|
1359
|
+
--
|
1360
|
+
|
1361
|
+
##### [initialize](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/multi_touch.rb#L180) common
|
974
1362
|
|
975
1363
|
> def initialize(driver = $driver)
|
976
1364
|
|
977
1365
|
self
|
978
1366
|
|
979
|
-
__Returns:__
|
1367
|
+
__Returns:__
|
1368
|
+
|
1369
|
+
[MultiTouch] a new instance of MultiTouch
|
980
1370
|
|
981
|
-
|
1371
|
+
--
|
1372
|
+
|
1373
|
+
##### [COMPLEX_ACTIONS](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/touch_actions.rb#L33) common
|
982
1374
|
|
983
1375
|
> COMPLEX_ACTIONS = ::Appium::Core::TouchAction::COMPLEX_ACTIONS
|
984
1376
|
|
985
1377
|
|
986
1378
|
|
987
|
-
|
1379
|
+
--
|
1380
|
+
|
1381
|
+
##### [initialize](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/touch_actions.rb#L48) common
|
988
1382
|
|
989
1383
|
> def initialize(driver = $driver)
|
990
1384
|
|
991
1385
|
|
992
1386
|
|
993
|
-
__Returns:__
|
1387
|
+
__Returns:__
|
1388
|
+
|
1389
|
+
[TouchAction] a new instance of TouchAction
|
1390
|
+
|
1391
|
+
--
|
994
1392
|
|
995
|
-
|
1393
|
+
##### [swipe](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/touch_actions.rb#L52) common
|
996
1394
|
|
997
1395
|
> def swipe(opts)
|
998
1396
|
|
999
1397
|
|
1000
1398
|
|
1001
|
-
|
1399
|
+
--
|
1400
|
+
|
1401
|
+
##### [initialize](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/command/ws_logcat.rb#L5) common
|
1002
1402
|
|
1003
1403
|
> def initialize(url:, output_file: 'logcat.log')
|
1004
1404
|
|
1005
1405
|
|
1006
1406
|
|
1007
|
-
__Returns:__
|
1407
|
+
__Returns:__
|
1408
|
+
|
1409
|
+
[WsLogcat] a new instance of WsLogcat
|
1008
1410
|
|
1009
|
-
|
1411
|
+
--
|
1412
|
+
|
1413
|
+
##### [handle_message_data](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/common/command/ws_logcat.rb#L10) common
|
1010
1414
|
|
1011
1415
|
> def handle_message_data(data)
|
1012
1416
|
|
1013
1417
|
|
1014
1418
|
|
1015
|
-
|
1419
|
+
--
|
1420
|
+
|
1421
|
+
##### [for](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/ios.rb#L15) ios
|
1016
1422
|
|
1017
1423
|
> def self.for(target)
|
1018
1424
|
|
1019
1425
|
|
1020
1426
|
|
1021
|
-
|
1427
|
+
--
|
1428
|
+
|
1429
|
+
##### [UIAStaticText](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/text.rb#L4) ios
|
1022
1430
|
|
1023
1431
|
> UIAStaticText = 'UIAStaticText'.freeze
|
1024
1432
|
|
1025
1433
|
|
1026
1434
|
|
1027
|
-
|
1435
|
+
--
|
1436
|
+
|
1437
|
+
##### [XCUIElementTypeStaticText](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/text.rb#L5) ios
|
1028
1438
|
|
1029
1439
|
> XCUIElementTypeStaticText = 'XCUIElementTypeStaticText'.freeze
|
1030
1440
|
|
1031
1441
|
|
1032
1442
|
|
1033
|
-
|
1443
|
+
--
|
1444
|
+
|
1445
|
+
##### [static_text_class](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/text.rb#L8) ios
|
1034
1446
|
|
1035
1447
|
> def static_text_class
|
1036
1448
|
|
1037
1449
|
|
1038
1450
|
|
1039
|
-
__Returns:__
|
1451
|
+
__Returns:__
|
1452
|
+
|
1453
|
+
[String] Class name for text
|
1040
1454
|
|
1041
|
-
|
1455
|
+
--
|
1456
|
+
|
1457
|
+
##### [text](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/text.rb#L16) ios
|
1042
1458
|
|
1043
1459
|
> def text(value)
|
1044
1460
|
|
1045
1461
|
Find the first UIAStaticText|XCUIElementTypeStaticText that contains value or by index.
|
1046
1462
|
If int then the UIAStaticText|XCUIElementTypeStaticText at that index is returned.
|
1047
1463
|
|
1048
|
-
__Parameters:__
|
1464
|
+
__Parameters:__
|
1465
|
+
|
1466
|
+
[String, Integer] value - the value to find.
|
1467
|
+
|
1468
|
+
__Returns:__
|
1469
|
+
|
1470
|
+
[UIAStaticText|XCUIElementTypeStaticText]
|
1049
1471
|
|
1050
|
-
|
1472
|
+
--
|
1051
1473
|
|
1052
|
-
|
1474
|
+
##### [texts](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/text.rb#L26) ios
|
1053
1475
|
|
1054
1476
|
> def texts(value = false)
|
1055
1477
|
|
1056
1478
|
Find all UIAStaticTexts|XCUIElementTypeStaticTexts containing value.
|
1057
1479
|
If value is omitted, all UIAStaticTexts|XCUIElementTypeStaticTexts are returned
|
1058
1480
|
|
1059
|
-
__Parameters:__
|
1481
|
+
__Parameters:__
|
1482
|
+
|
1483
|
+
[String] value - the value to search for
|
1484
|
+
|
1485
|
+
__Returns:__
|
1486
|
+
|
1487
|
+
[Array<UIAStaticText|XCUIElementTypeStaticText>]
|
1060
1488
|
|
1061
|
-
|
1489
|
+
--
|
1062
1490
|
|
1063
|
-
|
1491
|
+
##### [first_text](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/text.rb#L34) ios
|
1064
1492
|
|
1065
1493
|
> def first_text
|
1066
1494
|
|
1067
1495
|
Find the first UIAStaticText|XCUIElementTypeStaticText.
|
1068
1496
|
|
1069
|
-
__Returns:__
|
1497
|
+
__Returns:__
|
1070
1498
|
|
1071
|
-
|
1499
|
+
[UIAStaticText|XCUIElementTypeStaticText]
|
1500
|
+
|
1501
|
+
--
|
1502
|
+
|
1503
|
+
##### [last_text](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/text.rb#L40) ios
|
1072
1504
|
|
1073
1505
|
> def last_text
|
1074
1506
|
|
1075
1507
|
Find the last UIAStaticText|XCUIElementTypeStaticText.
|
1076
1508
|
|
1077
|
-
__Returns:__
|
1509
|
+
__Returns:__
|
1510
|
+
|
1511
|
+
[UIAStaticText|XCUIElementTypeStaticText]
|
1512
|
+
|
1513
|
+
--
|
1078
1514
|
|
1079
|
-
|
1515
|
+
##### [text_exact](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/text.rb#L47) ios
|
1080
1516
|
|
1081
1517
|
> def text_exact(value)
|
1082
1518
|
|
1083
1519
|
Find the first UIAStaticText|XCUIElementTypeStaticText that exactly matches value.
|
1084
1520
|
|
1085
|
-
__Parameters:__
|
1521
|
+
__Parameters:__
|
1086
1522
|
|
1087
|
-
|
1523
|
+
[String] value - the value to match exactly
|
1088
1524
|
|
1089
|
-
|
1525
|
+
__Returns:__
|
1526
|
+
|
1527
|
+
[UIAStaticText|XCUIElementTypeStaticText]
|
1528
|
+
|
1529
|
+
--
|
1530
|
+
|
1531
|
+
##### [texts_exact](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/text.rb#L54) ios
|
1090
1532
|
|
1091
1533
|
> def texts_exact(value)
|
1092
1534
|
|
1093
1535
|
Find all UIAStaticTexts|XCUIElementTypeStaticTexts that exactly match value.
|
1094
1536
|
|
1095
|
-
__Parameters:__
|
1537
|
+
__Parameters:__
|
1538
|
+
|
1539
|
+
[String] value - the value to match exactly
|
1096
1540
|
|
1097
|
-
__Returns:__
|
1541
|
+
__Returns:__
|
1098
1542
|
|
1099
|
-
|
1543
|
+
[Array<UIAStaticText|XCUIElementTypeStaticText>]
|
1544
|
+
|
1545
|
+
--
|
1546
|
+
|
1547
|
+
##### [filter](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L5) ios
|
1100
1548
|
|
1101
1549
|
> def filter
|
1102
1550
|
|
1103
1551
|
Returns the value of attribute filter
|
1104
1552
|
|
1105
|
-
|
1553
|
+
--
|
1554
|
+
|
1555
|
+
##### [filter=](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L5) ios
|
1106
1556
|
|
1107
1557
|
> def filter=(value)
|
1108
1558
|
|
1109
1559
|
Sets the attribute filter
|
1110
1560
|
|
1111
|
-
__Parameters:__
|
1561
|
+
__Parameters:__
|
1562
|
+
|
1563
|
+
[] value - the value to set the attribute filter to.
|
1112
1564
|
|
1113
|
-
|
1565
|
+
--
|
1566
|
+
|
1567
|
+
##### [start_element](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L7) ios
|
1114
1568
|
|
1115
1569
|
> def start_element(type, attrs = [])
|
1116
1570
|
|
1117
1571
|
|
1118
1572
|
|
1119
|
-
|
1573
|
+
--
|
1574
|
+
|
1575
|
+
##### [ios_password](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L43) ios
|
1120
1576
|
|
1121
1577
|
> def ios_password(length = 1)
|
1122
1578
|
|
@@ -1124,45 +1580,69 @@ iOS only. On Android uiautomator always returns an empty string for EditText pas
|
|
1124
1580
|
|
1125
1581
|
Password character returned from value of UIASecureTextField
|
1126
1582
|
|
1127
|
-
__Parameters:__
|
1583
|
+
__Parameters:__
|
1584
|
+
|
1585
|
+
[Integer] length - the length of the password to generate
|
1586
|
+
|
1587
|
+
__Returns:__
|
1128
1588
|
|
1129
|
-
|
1589
|
+
[String] the returned string is of size length
|
1130
1590
|
|
1131
|
-
|
1591
|
+
--
|
1592
|
+
|
1593
|
+
##### [page](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L59) ios
|
1132
1594
|
|
1133
1595
|
> def page(opts = {})
|
1134
1596
|
|
1135
1597
|
Prints a string of interesting elements to the console.
|
1136
1598
|
|
1137
|
-
__Parameters:__
|
1599
|
+
__Parameters:__
|
1600
|
+
|
1601
|
+
[Hash] visible - a customizable set of options
|
1138
1602
|
|
1139
1603
|
[Hash] class - a customizable set of options
|
1140
1604
|
|
1141
|
-
__Returns:__
|
1605
|
+
__Returns:__
|
1606
|
+
|
1607
|
+
[void]
|
1608
|
+
|
1609
|
+
--
|
1142
1610
|
|
1143
|
-
|
1611
|
+
##### [id](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L86) ios
|
1144
1612
|
|
1145
1613
|
> def id(id)
|
1146
1614
|
|
1147
1615
|
Find by id
|
1148
1616
|
|
1149
|
-
__Parameters:__
|
1617
|
+
__Parameters:__
|
1150
1618
|
|
1151
|
-
|
1619
|
+
[String] id - the id to search for
|
1152
1620
|
|
1153
|
-
|
1621
|
+
__Returns:__
|
1622
|
+
|
1623
|
+
[Element]
|
1624
|
+
|
1625
|
+
--
|
1626
|
+
|
1627
|
+
##### [ele_index](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L94) ios
|
1154
1628
|
|
1155
1629
|
> def ele_index(class_name, index)
|
1156
1630
|
|
1157
1631
|
Get the element of type class_name at matching index.
|
1158
1632
|
|
1159
|
-
__Parameters:__
|
1633
|
+
__Parameters:__
|
1634
|
+
|
1635
|
+
[String] class_name - the class name to find
|
1160
1636
|
|
1161
1637
|
[Integer] index - the index
|
1162
1638
|
|
1163
|
-
__Returns:__
|
1639
|
+
__Returns:__
|
1164
1640
|
|
1165
|
-
|
1641
|
+
[Element]
|
1642
|
+
|
1643
|
+
--
|
1644
|
+
|
1645
|
+
##### [find_ele_by_attr](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L124) ios
|
1166
1646
|
|
1167
1647
|
> def find_ele_by_attr(class_name, attr, value)
|
1168
1648
|
|
@@ -1170,15 +1650,21 @@ Find the first element exactly matching class and attribute value.
|
|
1170
1650
|
Note: Uses XPath
|
1171
1651
|
Note: For XCUITest, this method return ALL elements include displayed or not displayed elements.
|
1172
1652
|
|
1173
|
-
__Parameters:__
|
1653
|
+
__Parameters:__
|
1654
|
+
|
1655
|
+
[String] class_name - the class name to search for
|
1174
1656
|
|
1175
1657
|
[String] attr - the attribute to inspect
|
1176
1658
|
|
1177
1659
|
[String] value - the expected value of the attribute
|
1178
1660
|
|
1179
|
-
__Returns:__
|
1661
|
+
__Returns:__
|
1662
|
+
|
1663
|
+
[Element]
|
1180
1664
|
|
1181
|
-
|
1665
|
+
--
|
1666
|
+
|
1667
|
+
##### [find_eles_by_attr](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L135) ios
|
1182
1668
|
|
1183
1669
|
> def find_eles_by_attr(class_name, attr, value)
|
1184
1670
|
|
@@ -1186,133 +1672,199 @@ Find all elements exactly matching class and attribute value.
|
|
1186
1672
|
Note: Uses XPath
|
1187
1673
|
Note: For XCUITest, this method return ALL elements include displayed or not displayed elements.
|
1188
1674
|
|
1189
|
-
__Parameters:__
|
1675
|
+
__Parameters:__
|
1676
|
+
|
1677
|
+
[String] class_name - the class name to match
|
1190
1678
|
|
1191
1679
|
[String] attr - the attribute to compare
|
1192
1680
|
|
1193
1681
|
[String] value - the value of the attribute that the element must have
|
1194
1682
|
|
1195
|
-
__Returns:__
|
1683
|
+
__Returns:__
|
1684
|
+
|
1685
|
+
[Array<Element>]
|
1686
|
+
|
1687
|
+
--
|
1196
1688
|
|
1197
|
-
|
1689
|
+
##### [find_ele_by_predicate](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L148) ios
|
1198
1690
|
|
1199
1691
|
> def find_ele_by_predicate(class_name: '*', value:)
|
1200
1692
|
|
1201
1693
|
Find the first element exactly matching attribute case insensitive value.
|
1202
1694
|
Note: Uses Predicate
|
1203
1695
|
|
1204
|
-
__Parameters:__
|
1696
|
+
__Parameters:__
|
1205
1697
|
|
1206
|
-
|
1698
|
+
[String] value - the expected value of the attribute
|
1699
|
+
|
1700
|
+
__Returns:__
|
1701
|
+
|
1702
|
+
[Element]
|
1703
|
+
|
1704
|
+
--
|
1207
1705
|
|
1208
|
-
|
1706
|
+
##### [find_eles_by_predicate](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L160) ios
|
1209
1707
|
|
1210
1708
|
> def find_eles_by_predicate(class_name: '*', value:)
|
1211
1709
|
|
1212
1710
|
Find all elements exactly matching attribute case insensitive value.
|
1213
1711
|
Note: Uses Predicate
|
1214
1712
|
|
1215
|
-
__Parameters:__
|
1713
|
+
__Parameters:__
|
1714
|
+
|
1715
|
+
[String] value - the value of the attribute that the element must have
|
1216
1716
|
|
1217
1717
|
[String] class_name - the tag name to match
|
1218
1718
|
|
1219
|
-
__Returns:__
|
1719
|
+
__Returns:__
|
1720
|
+
|
1721
|
+
[Array<Element>]
|
1722
|
+
|
1723
|
+
--
|
1220
1724
|
|
1221
|
-
|
1725
|
+
##### [find_ele_by_attr_include](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L176) ios
|
1222
1726
|
|
1223
1727
|
> def find_ele_by_attr_include(class_name, attr, value)
|
1224
1728
|
|
1225
1729
|
Get the first tag by attribute that exactly matches value.
|
1226
1730
|
Note: Uses XPath
|
1227
1731
|
|
1228
|
-
__Parameters:__
|
1732
|
+
__Parameters:__
|
1733
|
+
|
1734
|
+
[String] class_name - the tag name to match
|
1229
1735
|
|
1230
1736
|
[String] attr - the attribute to compare
|
1231
1737
|
|
1232
1738
|
[String] value - the value of the attribute that the element must include
|
1233
1739
|
|
1234
|
-
__Returns:__
|
1740
|
+
__Returns:__
|
1741
|
+
|
1742
|
+
[Element] the element of type tag who's attribute includes value
|
1235
1743
|
|
1236
|
-
|
1744
|
+
--
|
1745
|
+
|
1746
|
+
##### [find_eles_by_attr_include](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L186) ios
|
1237
1747
|
|
1238
1748
|
> def find_eles_by_attr_include(class_name, attr, value)
|
1239
1749
|
|
1240
1750
|
Get tags by attribute that include value.
|
1241
1751
|
Note: Uses XPath
|
1242
1752
|
|
1243
|
-
__Parameters:__
|
1753
|
+
__Parameters:__
|
1754
|
+
|
1755
|
+
[String] class_name - the tag name to match
|
1244
1756
|
|
1245
1757
|
[String] attr - the attribute to compare
|
1246
1758
|
|
1247
1759
|
[String] value - the value of the attribute that the element must include
|
1248
1760
|
|
1249
|
-
__Returns:__
|
1761
|
+
__Returns:__
|
1762
|
+
|
1763
|
+
[Array<Element>] the elements of type tag who's attribute includes value
|
1250
1764
|
|
1251
|
-
|
1765
|
+
--
|
1766
|
+
|
1767
|
+
##### [find_ele_by_predicate_include](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L194) ios
|
1252
1768
|
|
1253
1769
|
> def find_ele_by_predicate_include(class_name: '*', value:)
|
1254
1770
|
|
1255
1771
|
Get the first elements that include insensitive value.
|
1256
1772
|
Note: Uses Predicate
|
1257
1773
|
|
1258
|
-
__Parameters:__
|
1774
|
+
__Parameters:__
|
1775
|
+
|
1776
|
+
[String] value - the value of the attribute that the element must include
|
1777
|
+
|
1778
|
+
__Returns:__
|
1779
|
+
|
1780
|
+
[Element] the element of type tag who's attribute includes value
|
1259
1781
|
|
1260
|
-
|
1782
|
+
--
|
1261
1783
|
|
1262
|
-
|
1784
|
+
##### [find_eles_by_predicate_include](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L206) ios
|
1263
1785
|
|
1264
1786
|
> def find_eles_by_predicate_include(class_name: '*', value:)
|
1265
1787
|
|
1266
1788
|
Get elements that include case insensitive value.
|
1267
1789
|
Note: Uses Predicate
|
1268
1790
|
|
1269
|
-
__Parameters:__
|
1791
|
+
__Parameters:__
|
1792
|
+
|
1793
|
+
[String] value - the value of the attribute that the element must include
|
1270
1794
|
|
1271
1795
|
[String] class_name - the tag name to match
|
1272
1796
|
|
1273
|
-
__Returns:__
|
1797
|
+
__Returns:__
|
1274
1798
|
|
1275
|
-
|
1799
|
+
[Array<Element>] the elements of type tag who's attribute includes value
|
1800
|
+
|
1801
|
+
--
|
1802
|
+
|
1803
|
+
##### [first_ele](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L219) ios
|
1276
1804
|
|
1277
1805
|
> def first_ele(class_name)
|
1278
1806
|
|
1279
1807
|
Get the first tag that matches class_name
|
1280
1808
|
|
1281
|
-
__Parameters:__
|
1809
|
+
__Parameters:__
|
1810
|
+
|
1811
|
+
[String] class_name - the tag to match
|
1812
|
+
|
1813
|
+
__Returns:__
|
1282
1814
|
|
1283
|
-
|
1815
|
+
[Element]
|
1284
1816
|
|
1285
|
-
|
1817
|
+
--
|
1818
|
+
|
1819
|
+
##### [last_ele](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L226) ios
|
1286
1820
|
|
1287
1821
|
> def last_ele(class_name)
|
1288
1822
|
|
1289
1823
|
Get the last tag that matches class_name
|
1290
1824
|
|
1291
|
-
__Parameters:__
|
1825
|
+
__Parameters:__
|
1826
|
+
|
1827
|
+
[String] class_name - the tag to match
|
1828
|
+
|
1829
|
+
__Returns:__
|
1292
1830
|
|
1293
|
-
|
1831
|
+
[Element]
|
1294
1832
|
|
1295
|
-
|
1833
|
+
--
|
1834
|
+
|
1835
|
+
##### [tag](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L234) ios
|
1296
1836
|
|
1297
1837
|
> def tag(class_name)
|
1298
1838
|
|
1299
1839
|
Returns the first **visible** element matching class_name
|
1300
1840
|
|
1301
|
-
__Parameters:__
|
1841
|
+
__Parameters:__
|
1842
|
+
|
1843
|
+
[String] class_name - the class_name to search for
|
1302
1844
|
|
1303
|
-
__Returns:__
|
1845
|
+
__Returns:__
|
1304
1846
|
|
1305
|
-
|
1847
|
+
[Element]
|
1848
|
+
|
1849
|
+
--
|
1850
|
+
|
1851
|
+
##### [tags](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L242) ios
|
1306
1852
|
|
1307
1853
|
> def tags(class_name)
|
1308
1854
|
|
1309
1855
|
Returns all visible elements matching class_name
|
1310
1856
|
|
1311
|
-
__Parameters:__
|
1857
|
+
__Parameters:__
|
1858
|
+
|
1859
|
+
[String] class_name - the class_name to search for
|
1860
|
+
|
1861
|
+
__Returns:__
|
1312
1862
|
|
1313
|
-
|
1863
|
+
[Element]
|
1314
1864
|
|
1315
|
-
|
1865
|
+
--
|
1866
|
+
|
1867
|
+
##### [tags_include](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L253) ios
|
1316
1868
|
|
1317
1869
|
> def tags_include(class_names:, value: nil)
|
1318
1870
|
|
@@ -1320,13 +1872,19 @@ Returns all visible elements matching class_names and value
|
|
1320
1872
|
This method calls find_element/s and element.value/text many times.
|
1321
1873
|
So, if you set many class_names, this method's performance become worse.
|
1322
1874
|
|
1323
|
-
__Parameters:__
|
1875
|
+
__Parameters:__
|
1876
|
+
|
1877
|
+
[Array[String]] class_names - the class_names to search for
|
1324
1878
|
|
1325
1879
|
[String] value - the value to search for
|
1326
1880
|
|
1327
|
-
__Returns:__
|
1881
|
+
__Returns:__
|
1882
|
+
|
1883
|
+
[Array[Element]]
|
1884
|
+
|
1885
|
+
--
|
1328
1886
|
|
1329
|
-
|
1887
|
+
##### [tags_exact](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L268) ios
|
1330
1888
|
|
1331
1889
|
> def tags_exact(class_names:, value: nil)
|
1332
1890
|
|
@@ -1334,65 +1892,95 @@ Returns all visible elements matching class_names and value.
|
|
1334
1892
|
This method calls find_element/s and element.value/text many times.
|
1335
1893
|
So, if you set many class_names, this method's performance become worse.
|
1336
1894
|
|
1337
|
-
__Parameters:__
|
1895
|
+
__Parameters:__
|
1896
|
+
|
1897
|
+
[Array[String]] class_names - the class_names to search for
|
1338
1898
|
|
1339
1899
|
[String] value - the value to search for
|
1340
1900
|
|
1341
|
-
__Returns:__
|
1901
|
+
__Returns:__
|
1902
|
+
|
1903
|
+
[Array[Element]]
|
1342
1904
|
|
1343
|
-
|
1905
|
+
--
|
1906
|
+
|
1907
|
+
##### [ele_by_json_visible_contains](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L305) ios
|
1344
1908
|
|
1345
1909
|
> def ele_by_json_visible_contains(element, value)
|
1346
1910
|
|
1347
1911
|
Find the first element that contains value.
|
1348
1912
|
For Appium(automation name), not XCUITest
|
1349
1913
|
|
1350
|
-
__Parameters:__
|
1914
|
+
__Parameters:__
|
1915
|
+
|
1916
|
+
[String] element - the class name for the element
|
1351
1917
|
|
1352
1918
|
[String] value - the value to search for
|
1353
1919
|
|
1354
|
-
__Returns:__
|
1920
|
+
__Returns:__
|
1355
1921
|
|
1356
|
-
|
1922
|
+
[Element]
|
1923
|
+
|
1924
|
+
--
|
1925
|
+
|
1926
|
+
##### [eles_by_json_visible_contains](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L314) ios
|
1357
1927
|
|
1358
1928
|
> def eles_by_json_visible_contains(element, value)
|
1359
1929
|
|
1360
1930
|
Find all elements containing value
|
1361
1931
|
For Appium(automation name), not XCUITest
|
1362
1932
|
|
1363
|
-
__Parameters:__
|
1933
|
+
__Parameters:__
|
1934
|
+
|
1935
|
+
[String] element - the class name for the element
|
1364
1936
|
|
1365
1937
|
[String] value - the value to search for
|
1366
1938
|
|
1367
|
-
__Returns:__
|
1939
|
+
__Returns:__
|
1940
|
+
|
1941
|
+
[Array<Element>]
|
1942
|
+
|
1943
|
+
--
|
1368
1944
|
|
1369
|
-
|
1945
|
+
##### [ele_by_json_visible_exact](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L344) ios
|
1370
1946
|
|
1371
1947
|
> def ele_by_json_visible_exact(element, value)
|
1372
1948
|
|
1373
1949
|
Find the first element exactly matching value
|
1374
1950
|
For Appium(automation name), not XCUITest
|
1375
1951
|
|
1376
|
-
__Parameters:__
|
1952
|
+
__Parameters:__
|
1953
|
+
|
1954
|
+
[String] element - the class name for the element
|
1377
1955
|
|
1378
1956
|
[String] value - the value to search for
|
1379
1957
|
|
1380
|
-
__Returns:__
|
1958
|
+
__Returns:__
|
1959
|
+
|
1960
|
+
[Element]
|
1381
1961
|
|
1382
|
-
|
1962
|
+
--
|
1963
|
+
|
1964
|
+
##### [eles_by_json_visible_exact](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L353) ios
|
1383
1965
|
|
1384
1966
|
> def eles_by_json_visible_exact(element, value)
|
1385
1967
|
|
1386
1968
|
Find all elements exactly matching value
|
1387
1969
|
For Appium(automation name), not XCUITest
|
1388
1970
|
|
1389
|
-
__Parameters:__
|
1971
|
+
__Parameters:__
|
1972
|
+
|
1973
|
+
[String] element - the class name for the element
|
1390
1974
|
|
1391
1975
|
[String] value - the value to search for
|
1392
1976
|
|
1393
|
-
__Returns:__
|
1977
|
+
__Returns:__
|
1394
1978
|
|
1395
|
-
|
1979
|
+
[Element]
|
1980
|
+
|
1981
|
+
--
|
1982
|
+
|
1983
|
+
##### [_all_pred](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L362) ios
|
1396
1984
|
|
1397
1985
|
> def _all_pred(opts)
|
1398
1986
|
|
@@ -1400,7 +1988,9 @@ predicate - the predicate to evaluate on the main app
|
|
1400
1988
|
|
1401
1989
|
visible - if true, only visible elements are returned. default true
|
1402
1990
|
|
1403
|
-
|
1991
|
+
--
|
1992
|
+
|
1993
|
+
##### [ele_with_pred](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L376) ios
|
1404
1994
|
|
1405
1995
|
> def ele_with_pred(opts)
|
1406
1996
|
|
@@ -1410,9 +2000,13 @@ predicate - the predicate to evaluate on the main app
|
|
1410
2000
|
|
1411
2001
|
visible - if true, only visible elements are returned. default true
|
1412
2002
|
|
1413
|
-
__Returns:__
|
2003
|
+
__Returns:__
|
2004
|
+
|
2005
|
+
[Element]
|
2006
|
+
|
2007
|
+
--
|
1414
2008
|
|
1415
|
-
|
2009
|
+
##### [eles_with_pred](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L387) ios
|
1416
2010
|
|
1417
2011
|
> def eles_with_pred(opts)
|
1418
2012
|
|
@@ -1422,15 +2016,21 @@ predicate - the predicate to evaluate on the main app
|
|
1422
2016
|
|
1423
2017
|
visible - if true, only visible elements are returned. default true
|
1424
2018
|
|
1425
|
-
__Returns:__
|
2019
|
+
__Returns:__
|
1426
2020
|
|
1427
|
-
|
2021
|
+
[Array<Element>]
|
2022
|
+
|
2023
|
+
--
|
2024
|
+
|
2025
|
+
##### [_validate_object](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L391) ios
|
1428
2026
|
|
1429
2027
|
> def _validate_object(*objects)
|
1430
2028
|
|
1431
2029
|
|
1432
2030
|
|
1433
|
-
|
2031
|
+
--
|
2032
|
+
|
2033
|
+
##### [_by_json](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L441) ios
|
1434
2034
|
|
1435
2035
|
> def _by_json(opts)
|
1436
2036
|
|
@@ -1463,7 +2063,9 @@ opts = {
|
|
1463
2063
|
}
|
1464
2064
|
}
|
1465
2065
|
|
1466
|
-
|
2066
|
+
--
|
2067
|
+
|
2068
|
+
##### [eles_by_json](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L491) ios
|
1467
2069
|
|
1468
2070
|
> def eles_by_json(opts)
|
1469
2071
|
|
@@ -1480,79 +2082,115 @@ eles_by_json({
|
|
1480
2082
|
},
|
1481
2083
|
})
|
1482
2084
|
|
1483
|
-
|
2085
|
+
--
|
2086
|
+
|
2087
|
+
##### [ele_by_json](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/common/helper.rb#L497) ios
|
1484
2088
|
|
1485
2089
|
> def ele_by_json(opts)
|
1486
2090
|
|
1487
2091
|
see eles_by_json
|
1488
2092
|
|
1489
|
-
|
2093
|
+
--
|
2094
|
+
|
2095
|
+
##### [alert_accept](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/alert.rb#L5) ios
|
1490
2096
|
|
1491
2097
|
> def alert_accept
|
1492
2098
|
|
1493
2099
|
Accept the alert.
|
1494
2100
|
|
1495
|
-
__Returns:__
|
2101
|
+
__Returns:__
|
2102
|
+
|
2103
|
+
[void]
|
1496
2104
|
|
1497
|
-
|
2105
|
+
--
|
2106
|
+
|
2107
|
+
##### [alert_dismiss](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/alert.rb#L13) ios
|
1498
2108
|
|
1499
2109
|
> def alert_dismiss
|
1500
2110
|
|
1501
2111
|
Dismiss the alert.
|
1502
2112
|
|
1503
|
-
__Returns:__
|
2113
|
+
__Returns:__
|
2114
|
+
|
2115
|
+
[void]
|
1504
2116
|
|
1505
|
-
|
2117
|
+
--
|
2118
|
+
|
2119
|
+
##### [UIAButton](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/button.rb#L4) ios
|
1506
2120
|
|
1507
2121
|
> UIAButton = 'UIAButton'.freeze
|
1508
2122
|
|
1509
2123
|
|
1510
2124
|
|
1511
|
-
|
2125
|
+
--
|
2126
|
+
|
2127
|
+
##### [XCUIElementTypeButton](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/button.rb#L5) ios
|
1512
2128
|
|
1513
2129
|
> XCUIElementTypeButton = 'XCUIElementTypeButton'.freeze
|
1514
2130
|
|
1515
2131
|
|
1516
2132
|
|
1517
|
-
|
2133
|
+
--
|
2134
|
+
|
2135
|
+
##### [button_class](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/button.rb#L8) ios
|
1518
2136
|
|
1519
2137
|
> def button_class
|
1520
2138
|
|
1521
2139
|
|
1522
2140
|
|
1523
|
-
__Returns:__
|
2141
|
+
__Returns:__
|
2142
|
+
|
2143
|
+
[String] Class name for button
|
1524
2144
|
|
1525
|
-
|
2145
|
+
--
|
2146
|
+
|
2147
|
+
##### [button](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/button.rb#L16) ios
|
1526
2148
|
|
1527
2149
|
> def button(value)
|
1528
2150
|
|
1529
2151
|
Find the first UIAButton|XCUIElementTypeButton that contains value or by index.
|
1530
2152
|
If int then the UIAButton|XCUIElementTypeButton at that index is returned.
|
1531
2153
|
|
1532
|
-
__Parameters:__
|
2154
|
+
__Parameters:__
|
2155
|
+
|
2156
|
+
[String, Integer] value - the value to exactly match.
|
2157
|
+
|
2158
|
+
__Returns:__
|
2159
|
+
|
2160
|
+
[UIAButton|XCUIElementTypeButton]
|
1533
2161
|
|
1534
|
-
|
2162
|
+
--
|
1535
2163
|
|
1536
|
-
|
2164
|
+
##### [buttons](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/button.rb#L27) ios
|
1537
2165
|
|
1538
2166
|
> def buttons(value = false)
|
1539
2167
|
|
1540
2168
|
Find all UIAButtons|XCUIElementTypeButtons containing value.
|
1541
2169
|
If value is omitted, all UIAButtons|XCUIElementTypeButtons are returned.
|
1542
2170
|
|
1543
|
-
__Parameters:__
|
2171
|
+
__Parameters:__
|
2172
|
+
|
2173
|
+
[String] value - the value to search for
|
2174
|
+
|
2175
|
+
__Returns:__
|
2176
|
+
|
2177
|
+
[Array<UIAButton|XCUIElementTypeButton>]
|
1544
2178
|
|
1545
|
-
|
2179
|
+
--
|
1546
2180
|
|
1547
|
-
|
2181
|
+
##### [first_button](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/button.rb#L35) ios
|
1548
2182
|
|
1549
2183
|
> def first_button
|
1550
2184
|
|
1551
2185
|
Find the first UIAButton|XCUIElementTypeButton.
|
1552
2186
|
|
1553
|
-
__Returns:__
|
2187
|
+
__Returns:__
|
1554
2188
|
|
1555
|
-
|
2189
|
+
[UIAButton|XCUIElementTypeButton]
|
2190
|
+
|
2191
|
+
--
|
2192
|
+
|
2193
|
+
##### [last_button](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/button.rb#L43) ios
|
1556
2194
|
|
1557
2195
|
> def last_button
|
1558
2196
|
|
@@ -1560,117 +2198,181 @@ TODO: add documentation regarding previous element.
|
|
1560
2198
|
Previous UIAElement is differ from UIAButton|XCUIElementTypeButton. So, the results are different.
|
1561
2199
|
Find the last UIAButton|XCUIElementTypeButton.
|
1562
2200
|
|
1563
|
-
__Returns:__
|
2201
|
+
__Returns:__
|
2202
|
+
|
2203
|
+
[UIAButton|XCUIElementTypeButton]
|
1564
2204
|
|
1565
|
-
|
2205
|
+
--
|
2206
|
+
|
2207
|
+
##### [button_exact](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/button.rb#L50) ios
|
1566
2208
|
|
1567
2209
|
> def button_exact(value)
|
1568
2210
|
|
1569
2211
|
Find the first UIAButton|XCUIElementTypeButton that exactly matches value.
|
1570
2212
|
|
1571
|
-
__Parameters:__
|
2213
|
+
__Parameters:__
|
2214
|
+
|
2215
|
+
[String] value - the value to match exactly
|
1572
2216
|
|
1573
|
-
__Returns:__
|
2217
|
+
__Returns:__
|
1574
2218
|
|
1575
|
-
|
2219
|
+
[UIAButton|XCUIElementTypeButton]
|
2220
|
+
|
2221
|
+
--
|
2222
|
+
|
2223
|
+
##### [buttons_exact](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/button.rb#L57) ios
|
1576
2224
|
|
1577
2225
|
> def buttons_exact(value)
|
1578
2226
|
|
1579
2227
|
Find all UIAButtons|XCUIElementTypeButtons that exactly match value.
|
1580
2228
|
|
1581
|
-
__Parameters:__
|
2229
|
+
__Parameters:__
|
2230
|
+
|
2231
|
+
[String] value - the value to match exactly
|
2232
|
+
|
2233
|
+
__Returns:__
|
1582
2234
|
|
1583
|
-
|
2235
|
+
[Array<UIAButton|XCUIElementTypeButton>]
|
1584
2236
|
|
1585
|
-
|
2237
|
+
--
|
2238
|
+
|
2239
|
+
##### [find](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/generic.rb#L6) ios
|
1586
2240
|
|
1587
2241
|
> def find(value)
|
1588
2242
|
|
1589
2243
|
Find the first element containing value
|
1590
2244
|
|
1591
|
-
__Parameters:__
|
2245
|
+
__Parameters:__
|
2246
|
+
|
2247
|
+
[String] value - the value to search for
|
2248
|
+
|
2249
|
+
__Returns:__
|
2250
|
+
|
2251
|
+
[Element]
|
1592
2252
|
|
1593
|
-
|
2253
|
+
--
|
1594
2254
|
|
1595
|
-
|
2255
|
+
##### [finds](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/generic.rb#L13) ios
|
1596
2256
|
|
1597
2257
|
> def finds(value)
|
1598
2258
|
|
1599
2259
|
Find all elements containing value
|
1600
2260
|
|
1601
|
-
__Parameters:__
|
2261
|
+
__Parameters:__
|
2262
|
+
|
2263
|
+
[String] value - the value to search for
|
2264
|
+
|
2265
|
+
__Returns:__
|
2266
|
+
|
2267
|
+
[Array<Element>]
|
1602
2268
|
|
1603
|
-
|
2269
|
+
--
|
1604
2270
|
|
1605
|
-
|
2271
|
+
##### [find_exact](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/generic.rb#L20) ios
|
1606
2272
|
|
1607
2273
|
> def find_exact(value)
|
1608
2274
|
|
1609
2275
|
Find the first element exactly matching value
|
1610
2276
|
|
1611
|
-
__Parameters:__
|
2277
|
+
__Parameters:__
|
1612
2278
|
|
1613
|
-
|
2279
|
+
[String] value - the value to search for
|
2280
|
+
|
2281
|
+
__Returns:__
|
2282
|
+
|
2283
|
+
[Element]
|
1614
2284
|
|
1615
|
-
|
2285
|
+
--
|
2286
|
+
|
2287
|
+
##### [finds_exact](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/generic.rb#L27) ios
|
1616
2288
|
|
1617
2289
|
> def finds_exact(value)
|
1618
2290
|
|
1619
2291
|
Find all elements exactly matching value
|
1620
2292
|
|
1621
|
-
__Parameters:__
|
2293
|
+
__Parameters:__
|
1622
2294
|
|
1623
|
-
|
2295
|
+
[String] value - the value to search for
|
1624
2296
|
|
1625
|
-
|
2297
|
+
__Returns:__
|
2298
|
+
|
2299
|
+
[Array<Element>]
|
2300
|
+
|
2301
|
+
--
|
2302
|
+
|
2303
|
+
##### [raise_error_if_no_element](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/generic.rb#L33) ios
|
1626
2304
|
|
1627
2305
|
> def raise_error_if_no_element(element)
|
1628
2306
|
|
1629
2307
|
|
1630
2308
|
|
1631
|
-
|
2309
|
+
--
|
2310
|
+
|
2311
|
+
##### [select_visible_elements](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/generic.rb#L41) ios
|
1632
2312
|
|
1633
2313
|
> def select_visible_elements(elements)
|
1634
2314
|
|
1635
2315
|
Return visible elements.
|
1636
2316
|
|
1637
|
-
|
2317
|
+
--
|
2318
|
+
|
2319
|
+
##### [for](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/bridge.rb#L7) ios
|
1638
2320
|
|
1639
2321
|
> def self.for(target)
|
1640
2322
|
|
1641
2323
|
|
1642
2324
|
|
1643
|
-
|
2325
|
+
--
|
2326
|
+
|
2327
|
+
##### [last_ele](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/helper.rb#L26) ios
|
1644
2328
|
|
1645
2329
|
> def last_ele(class_name)
|
1646
2330
|
|
1647
2331
|
Get the last tag that matches class_name
|
1648
2332
|
|
1649
|
-
__Parameters:__
|
2333
|
+
__Parameters:__
|
2334
|
+
|
2335
|
+
[String] class_name - the tag to match
|
2336
|
+
|
2337
|
+
__Returns:__
|
1650
2338
|
|
1651
|
-
|
2339
|
+
[Element]
|
1652
2340
|
|
1653
|
-
|
2341
|
+
--
|
2342
|
+
|
2343
|
+
##### [tag](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/helper.rb#L37) ios
|
1654
2344
|
|
1655
2345
|
> def tag(class_name)
|
1656
2346
|
|
1657
2347
|
Returns the first **visible** element matching class_name
|
1658
2348
|
|
1659
|
-
__Parameters:__
|
2349
|
+
__Parameters:__
|
2350
|
+
|
2351
|
+
[String] class_name - the class_name to search for
|
2352
|
+
|
2353
|
+
__Returns:__
|
2354
|
+
|
2355
|
+
[Element]
|
1660
2356
|
|
1661
|
-
|
2357
|
+
--
|
1662
2358
|
|
1663
|
-
|
2359
|
+
##### [tags](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/helper.rb#L45) ios
|
1664
2360
|
|
1665
2361
|
> def tags(class_name)
|
1666
2362
|
|
1667
2363
|
Returns all visible elements matching class_name
|
1668
2364
|
|
1669
|
-
__Parameters:__
|
2365
|
+
__Parameters:__
|
1670
2366
|
|
1671
|
-
|
2367
|
+
[String] class_name - the class_name to search for
|
1672
2368
|
|
1673
|
-
|
2369
|
+
__Returns:__
|
2370
|
+
|
2371
|
+
[Element]
|
2372
|
+
|
2373
|
+
--
|
2374
|
+
|
2375
|
+
##### [tags_include](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/helper.rb#L57) ios
|
1674
2376
|
|
1675
2377
|
> def tags_include(class_names:, value: nil)
|
1676
2378
|
|
@@ -1678,13 +2380,19 @@ Returns all visible elements matching class_names and value
|
|
1678
2380
|
This method calls find_element/s and element.value/text many times.
|
1679
2381
|
So, if you set many class_names, this method's performance become worse.
|
1680
2382
|
|
1681
|
-
__Parameters:__
|
2383
|
+
__Parameters:__
|
2384
|
+
|
2385
|
+
[Array[String]] class_names - the class_names to search for
|
1682
2386
|
|
1683
2387
|
[String] value - the value to search for
|
1684
2388
|
|
1685
|
-
__Returns:__
|
2389
|
+
__Returns:__
|
2390
|
+
|
2391
|
+
[Array[Element]]
|
1686
2392
|
|
1687
|
-
|
2393
|
+
--
|
2394
|
+
|
2395
|
+
##### [tags_exact](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/helper.rb#L79) ios
|
1688
2396
|
|
1689
2397
|
> def tags_exact(class_names:, value: nil)
|
1690
2398
|
|
@@ -1692,67 +2400,95 @@ Returns all visible elements matching class_names and value.
|
|
1692
2400
|
This method calls find_element/s and element.value/text many times.
|
1693
2401
|
So, if you set many class_names, this method's performance become worse.
|
1694
2402
|
|
1695
|
-
__Parameters:__
|
2403
|
+
__Parameters:__
|
2404
|
+
|
2405
|
+
[Array[String]] class_names - the class_names to search for
|
1696
2406
|
|
1697
2407
|
[String] value - the value to search for
|
1698
2408
|
|
1699
|
-
__Returns:__
|
2409
|
+
__Returns:__
|
2410
|
+
|
2411
|
+
[Array[Element]]
|
2412
|
+
|
2413
|
+
--
|
1700
2414
|
|
1701
|
-
|
2415
|
+
##### [start_logs_broadcast](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/command.rb#L19) ios
|
1702
2416
|
|
1703
2417
|
> def start_logs_broadcast(syslog_file = 'syslog.log')
|
1704
2418
|
|
1705
2419
|
Starts iOS syslog broadcast websocket
|
1706
2420
|
|
1707
|
-
__Parameters:__
|
2421
|
+
__Parameters:__
|
1708
2422
|
|
1709
|
-
|
2423
|
+
[String] syslog_file - A file path to write messages from a syslog WebSocket client
|
2424
|
+
|
2425
|
+
--
|
2426
|
+
|
2427
|
+
##### [stop_logs_broadcast](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/command.rb#L32) ios
|
1710
2428
|
|
1711
2429
|
> def stop_logs_broadcast
|
1712
2430
|
|
1713
2431
|
Stop iOS syslog broadcast websocket
|
1714
2432
|
|
1715
|
-
|
2433
|
+
--
|
2434
|
+
|
2435
|
+
##### [UIATextField](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/textfield.rb#L3) ios
|
1716
2436
|
|
1717
2437
|
> UIATextField = 'UIATextField'.freeze
|
1718
2438
|
|
1719
2439
|
|
1720
2440
|
|
1721
|
-
|
2441
|
+
--
|
2442
|
+
|
2443
|
+
##### [UIASecureTextField](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/textfield.rb#L4) ios
|
1722
2444
|
|
1723
2445
|
> UIASecureTextField = 'UIASecureTextField'.freeze
|
1724
2446
|
|
1725
2447
|
|
1726
2448
|
|
1727
|
-
|
2449
|
+
--
|
2450
|
+
|
2451
|
+
##### [XCUIElementTypeTextField](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/textfield.rb#L6) ios
|
1728
2452
|
|
1729
2453
|
> XCUIElementTypeTextField = 'XCUIElementTypeTextField'.freeze
|
1730
2454
|
|
1731
2455
|
|
1732
2456
|
|
1733
|
-
|
2457
|
+
--
|
2458
|
+
|
2459
|
+
##### [XCUIElementTypeSecureTextField](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/textfield.rb#L7) ios
|
1734
2460
|
|
1735
2461
|
> XCUIElementTypeSecureTextField = 'XCUIElementTypeSecureTextField'.freeze
|
1736
2462
|
|
1737
2463
|
|
1738
2464
|
|
1739
|
-
|
2465
|
+
--
|
2466
|
+
|
2467
|
+
##### [text_field_class](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/textfield.rb#L10) ios
|
1740
2468
|
|
1741
2469
|
> def text_field_class
|
1742
2470
|
|
1743
2471
|
|
1744
2472
|
|
1745
|
-
__Returns:__
|
2473
|
+
__Returns:__
|
2474
|
+
|
2475
|
+
[String] Class name for text field
|
1746
2476
|
|
1747
|
-
|
2477
|
+
--
|
2478
|
+
|
2479
|
+
##### [secure_text_field_class](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/textfield.rb#L15) ios
|
1748
2480
|
|
1749
2481
|
> def secure_text_field_class
|
1750
2482
|
|
1751
2483
|
|
1752
2484
|
|
1753
|
-
__Returns:__
|
2485
|
+
__Returns:__
|
2486
|
+
|
2487
|
+
[String] Class name for secure text field
|
2488
|
+
|
2489
|
+
--
|
1754
2490
|
|
1755
|
-
|
2491
|
+
##### [textfield](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/textfield.rb#L24) ios
|
1756
2492
|
|
1757
2493
|
> def textfield(value)
|
1758
2494
|
|
@@ -1760,190 +2496,290 @@ Find the first TextField that contains value or by index.
|
|
1760
2496
|
Note: Uses XPath
|
1761
2497
|
If int then the TextField at that index is returned.
|
1762
2498
|
|
1763
|
-
__Parameters:__
|
2499
|
+
__Parameters:__
|
2500
|
+
|
2501
|
+
[String, Integer] value - the text to match exactly.
|
2502
|
+
|
2503
|
+
__Returns:__
|
1764
2504
|
|
1765
|
-
|
2505
|
+
[TextField]
|
1766
2506
|
|
1767
|
-
|
2507
|
+
--
|
2508
|
+
|
2509
|
+
##### [textfields](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/textfield.rb#L43) ios
|
1768
2510
|
|
1769
2511
|
> def textfields(value = false)
|
1770
2512
|
|
1771
2513
|
Find all TextFields containing value.
|
1772
2514
|
If value is omitted, all TextFields are returned.
|
1773
2515
|
|
1774
|
-
__Parameters:__
|
2516
|
+
__Parameters:__
|
2517
|
+
|
2518
|
+
[String] value - the value to search for
|
2519
|
+
|
2520
|
+
__Returns:__
|
1775
2521
|
|
1776
|
-
|
2522
|
+
[Array<TextField>]
|
1777
2523
|
|
1778
|
-
|
2524
|
+
--
|
2525
|
+
|
2526
|
+
##### [first_textfield](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/textfield.rb#L51) ios
|
1779
2527
|
|
1780
2528
|
> def first_textfield
|
1781
2529
|
|
1782
2530
|
Find the first TextField.
|
1783
2531
|
|
1784
|
-
__Returns:__
|
2532
|
+
__Returns:__
|
2533
|
+
|
2534
|
+
[TextField]
|
1785
2535
|
|
1786
|
-
|
2536
|
+
--
|
2537
|
+
|
2538
|
+
##### [last_textfield](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/textfield.rb#L57) ios
|
1787
2539
|
|
1788
2540
|
> def last_textfield
|
1789
2541
|
|
1790
2542
|
Find the last TextField.
|
1791
2543
|
|
1792
|
-
__Returns:__
|
2544
|
+
__Returns:__
|
2545
|
+
|
2546
|
+
[TextField]
|
1793
2547
|
|
1794
|
-
|
2548
|
+
--
|
2549
|
+
|
2550
|
+
##### [textfield_exact](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/textfield.rb#L67) ios
|
1795
2551
|
|
1796
2552
|
> def textfield_exact(value)
|
1797
2553
|
|
1798
2554
|
Find the first TextField that exactly matches value.
|
1799
2555
|
|
1800
|
-
__Parameters:__
|
2556
|
+
__Parameters:__
|
2557
|
+
|
2558
|
+
[String] value - the value to match exactly
|
2559
|
+
|
2560
|
+
__Returns:__
|
2561
|
+
|
2562
|
+
[TextField]
|
1801
2563
|
|
1802
|
-
|
2564
|
+
--
|
1803
2565
|
|
1804
|
-
|
2566
|
+
##### [textfields_exact](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/textfield.rb#L74) ios
|
1805
2567
|
|
1806
2568
|
> def textfields_exact(value)
|
1807
2569
|
|
1808
2570
|
Find all TextFields that exactly match value.
|
1809
2571
|
|
1810
|
-
__Parameters:__
|
2572
|
+
__Parameters:__
|
1811
2573
|
|
1812
|
-
|
2574
|
+
[String] value - the value to match exactly
|
1813
2575
|
|
1814
|
-
|
2576
|
+
__Returns:__
|
2577
|
+
|
2578
|
+
[Array<TextField>]
|
2579
|
+
|
2580
|
+
--
|
2581
|
+
|
2582
|
+
##### [_textfield_visible](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/textfield.rb#L81) ios
|
1815
2583
|
|
1816
2584
|
> def _textfield_visible
|
1817
2585
|
|
1818
2586
|
Appium
|
1819
2587
|
|
1820
|
-
|
2588
|
+
--
|
2589
|
+
|
2590
|
+
##### [_textfield_exact_string](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/textfield.rb#L86) ios
|
1821
2591
|
|
1822
2592
|
> def _textfield_exact_string(value)
|
1823
2593
|
|
1824
2594
|
Appium
|
1825
2595
|
|
1826
|
-
|
2596
|
+
--
|
2597
|
+
|
2598
|
+
##### [_textfield_contains_string](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/element/textfield.rb#L93) ios
|
1827
2599
|
|
1828
2600
|
> def _textfield_contains_string(value)
|
1829
2601
|
|
1830
2602
|
Appium
|
1831
2603
|
|
1832
|
-
|
2604
|
+
--
|
2605
|
+
|
2606
|
+
##### [static_text_class](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/text.rb#L9) ios
|
1833
2607
|
|
1834
2608
|
> def static_text_class
|
1835
2609
|
|
1836
2610
|
|
1837
2611
|
|
1838
|
-
__Returns:__
|
2612
|
+
__Returns:__
|
2613
|
+
|
2614
|
+
[String] Class name for text
|
1839
2615
|
|
1840
|
-
|
2616
|
+
--
|
2617
|
+
|
2618
|
+
##### [text](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/text.rb#L17) ios
|
1841
2619
|
|
1842
2620
|
> def text(value)
|
1843
2621
|
|
1844
2622
|
Find the first UIAStaticText|XCUIElementTypeStaticText that contains value or by index.
|
1845
2623
|
If int then the UIAStaticText|XCUIElementTypeStaticText at that index is returned.
|
1846
2624
|
|
1847
|
-
__Parameters:__
|
2625
|
+
__Parameters:__
|
2626
|
+
|
2627
|
+
[String, Integer] value - the value to find.
|
1848
2628
|
|
1849
|
-
__Returns:__
|
2629
|
+
__Returns:__
|
1850
2630
|
|
1851
|
-
|
2631
|
+
[UIAStaticText|XCUIElementTypeStaticText]
|
2632
|
+
|
2633
|
+
--
|
2634
|
+
|
2635
|
+
##### [texts](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/text.rb#L27) ios
|
1852
2636
|
|
1853
2637
|
> def texts(value = false)
|
1854
2638
|
|
1855
2639
|
Find all UIAStaticTexts|XCUIElementTypeStaticTexts containing value.
|
1856
2640
|
If value is omitted, all UIAStaticTexts|XCUIElementTypeStaticTexts are returned
|
1857
2641
|
|
1858
|
-
__Parameters:__
|
2642
|
+
__Parameters:__
|
2643
|
+
|
2644
|
+
[String] value - the value to search for
|
2645
|
+
|
2646
|
+
__Returns:__
|
1859
2647
|
|
1860
|
-
|
2648
|
+
[Array<UIAStaticText|XCUIElementTypeStaticText>]
|
1861
2649
|
|
1862
|
-
|
2650
|
+
--
|
2651
|
+
|
2652
|
+
##### [first_text](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/text.rb#L36) ios
|
1863
2653
|
|
1864
2654
|
> def first_text
|
1865
2655
|
|
1866
2656
|
Find the first UIAStaticText|XCUIElementTypeStaticText.
|
1867
2657
|
|
1868
|
-
__Returns:__
|
2658
|
+
__Returns:__
|
2659
|
+
|
2660
|
+
[UIAStaticText|XCUIElementTypeStaticText]
|
1869
2661
|
|
1870
|
-
|
2662
|
+
--
|
2663
|
+
|
2664
|
+
##### [last_text](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/text.rb#L42) ios
|
1871
2665
|
|
1872
2666
|
> def last_text
|
1873
2667
|
|
1874
2668
|
Find the last UIAStaticText|XCUIElementTypeStaticText.
|
1875
2669
|
|
1876
|
-
__Returns:__
|
2670
|
+
__Returns:__
|
2671
|
+
|
2672
|
+
[UIAStaticText|XCUIElementTypeStaticText]
|
1877
2673
|
|
1878
|
-
|
2674
|
+
--
|
2675
|
+
|
2676
|
+
##### [text_exact](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/text.rb#L49) ios
|
1879
2677
|
|
1880
2678
|
> def text_exact(value)
|
1881
2679
|
|
1882
2680
|
Find the first UIAStaticText|XCUIElementTypeStaticText that exactly matches value.
|
1883
2681
|
|
1884
|
-
__Parameters:__
|
2682
|
+
__Parameters:__
|
2683
|
+
|
2684
|
+
[String] value - the value to match exactly
|
2685
|
+
|
2686
|
+
__Returns:__
|
1885
2687
|
|
1886
|
-
|
2688
|
+
[UIAStaticText|XCUIElementTypeStaticText]
|
1887
2689
|
|
1888
|
-
|
2690
|
+
--
|
2691
|
+
|
2692
|
+
##### [texts_exact](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/text.rb#L56) ios
|
1889
2693
|
|
1890
2694
|
> def texts_exact(value)
|
1891
2695
|
|
1892
2696
|
Find all UIAStaticTexts|XCUIElementTypeStaticTexts that exactly match value.
|
1893
2697
|
|
1894
|
-
__Parameters:__
|
2698
|
+
__Parameters:__
|
2699
|
+
|
2700
|
+
[String] value - the value to match exactly
|
1895
2701
|
|
1896
|
-
__Returns:__
|
2702
|
+
__Returns:__
|
1897
2703
|
|
1898
|
-
|
2704
|
+
[Array<UIAStaticText|XCUIElementTypeStaticText>]
|
2705
|
+
|
2706
|
+
--
|
2707
|
+
|
2708
|
+
##### [xcuitest_source](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/command/source.rb#L11) ios
|
1899
2709
|
|
1900
2710
|
> def xcuitest_source(format: :xml)
|
1901
2711
|
|
1902
2712
|
|
1903
2713
|
|
1904
|
-
__Parameters:__
|
2714
|
+
__Parameters:__
|
1905
2715
|
|
1906
|
-
[
|
2716
|
+
[String|Symbol] format - :xml or :json. :xml is by default.
|
1907
2717
|
|
1908
|
-
|
2718
|
+
```ruby
|
2719
|
+
xcuitest_source format: :json
|
2720
|
+
```
|
2721
|
+
|
2722
|
+
--
|
2723
|
+
|
2724
|
+
##### [button_class](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/button.rb#L9) ios
|
1909
2725
|
|
1910
2726
|
> def button_class
|
1911
2727
|
|
1912
2728
|
|
1913
2729
|
|
1914
|
-
__Returns:__
|
2730
|
+
__Returns:__
|
2731
|
+
|
2732
|
+
[String] Class name for button
|
1915
2733
|
|
1916
|
-
|
2734
|
+
--
|
2735
|
+
|
2736
|
+
##### [button](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/button.rb#L17) ios
|
1917
2737
|
|
1918
2738
|
> def button(value)
|
1919
2739
|
|
1920
2740
|
Find the first UIAButton|XCUIElementTypeButton that contains value or by index.
|
1921
2741
|
If int then the UIAButton|XCUIElementTypeButton at that index is returned.
|
1922
2742
|
|
1923
|
-
__Parameters:__
|
2743
|
+
__Parameters:__
|
2744
|
+
|
2745
|
+
[String, Integer] value - the value to exactly match.
|
2746
|
+
|
2747
|
+
__Returns:__
|
2748
|
+
|
2749
|
+
[UIAButton|XCUIElementTypeButton]
|
1924
2750
|
|
1925
|
-
|
2751
|
+
--
|
1926
2752
|
|
1927
|
-
|
2753
|
+
##### [buttons](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/button.rb#L28) ios
|
1928
2754
|
|
1929
2755
|
> def buttons(value = false)
|
1930
2756
|
|
1931
2757
|
Find all UIAButtons|XCUIElementTypeButtons containing value.
|
1932
2758
|
If value is omitted, all UIAButtons|XCUIElementTypeButtons are returned.
|
1933
2759
|
|
1934
|
-
__Parameters:__
|
2760
|
+
__Parameters:__
|
1935
2761
|
|
1936
|
-
|
2762
|
+
[String] value - the value to search for
|
2763
|
+
|
2764
|
+
__Returns:__
|
2765
|
+
|
2766
|
+
[Array<UIAButton|XCUIElementTypeButton>]
|
1937
2767
|
|
1938
|
-
|
2768
|
+
--
|
2769
|
+
|
2770
|
+
##### [first_button](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/button.rb#L37) ios
|
1939
2771
|
|
1940
2772
|
> def first_button
|
1941
2773
|
|
1942
2774
|
Find the first UIAButton|XCUIElementTypeButton.
|
1943
2775
|
|
1944
|
-
__Returns:__
|
2776
|
+
__Returns:__
|
2777
|
+
|
2778
|
+
[UIAButton|XCUIElementTypeButton]
|
1945
2779
|
|
1946
|
-
|
2780
|
+
--
|
2781
|
+
|
2782
|
+
##### [last_button](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/button.rb#L45) ios
|
1947
2783
|
|
1948
2784
|
> def last_button
|
1949
2785
|
|
@@ -1951,131 +2787,193 @@ TODO: add documentation regarding previous element.
|
|
1951
2787
|
Previous UIAElement is differ from UIAButton|XCUIElementTypeButton. So, the results are different.
|
1952
2788
|
Find the last UIAButton|XCUIElementTypeButton.
|
1953
2789
|
|
1954
|
-
__Returns:__
|
2790
|
+
__Returns:__
|
2791
|
+
|
2792
|
+
[UIAButton|XCUIElementTypeButton]
|
1955
2793
|
|
1956
|
-
|
2794
|
+
--
|
2795
|
+
|
2796
|
+
##### [button_exact](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/button.rb#L52) ios
|
1957
2797
|
|
1958
2798
|
> def button_exact(value)
|
1959
2799
|
|
1960
2800
|
Find the first UIAButton|XCUIElementTypeButton that exactly matches value.
|
1961
2801
|
|
1962
|
-
__Parameters:__
|
2802
|
+
__Parameters:__
|
2803
|
+
|
2804
|
+
[String] value - the value to match exactly
|
1963
2805
|
|
1964
|
-
__Returns:__
|
2806
|
+
__Returns:__
|
1965
2807
|
|
1966
|
-
|
2808
|
+
[UIAButton|XCUIElementTypeButton]
|
2809
|
+
|
2810
|
+
--
|
2811
|
+
|
2812
|
+
##### [buttons_exact](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/button.rb#L59) ios
|
1967
2813
|
|
1968
2814
|
> def buttons_exact(value)
|
1969
2815
|
|
1970
2816
|
Find all UIAButtons|XCUIElementTypeButtons that exactly match value.
|
1971
2817
|
|
1972
|
-
__Parameters:__
|
2818
|
+
__Parameters:__
|
2819
|
+
|
2820
|
+
[String] value - the value to match exactly
|
2821
|
+
|
2822
|
+
__Returns:__
|
1973
2823
|
|
1974
|
-
|
2824
|
+
[Array<UIAButton|XCUIElementTypeButton>]
|
1975
2825
|
|
1976
|
-
|
2826
|
+
--
|
2827
|
+
|
2828
|
+
##### [find](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/generic.rb#L8) ios
|
1977
2829
|
|
1978
2830
|
> def find(value)
|
1979
2831
|
|
1980
2832
|
Find the first element containing value
|
1981
2833
|
|
1982
|
-
__Parameters:__
|
2834
|
+
__Parameters:__
|
2835
|
+
|
2836
|
+
[String] value - the value to search for
|
2837
|
+
|
2838
|
+
__Returns:__
|
1983
2839
|
|
1984
|
-
|
2840
|
+
[Element]
|
1985
2841
|
|
1986
|
-
|
2842
|
+
--
|
2843
|
+
|
2844
|
+
##### [finds](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/generic.rb#L15) ios
|
1987
2845
|
|
1988
2846
|
> def finds(value)
|
1989
2847
|
|
1990
2848
|
Find all elements containing value
|
1991
2849
|
|
1992
|
-
__Parameters:__
|
2850
|
+
__Parameters:__
|
2851
|
+
|
2852
|
+
[String] value - the value to search for
|
2853
|
+
|
2854
|
+
__Returns:__
|
2855
|
+
|
2856
|
+
[Array<Element>]
|
1993
2857
|
|
1994
|
-
|
2858
|
+
--
|
1995
2859
|
|
1996
|
-
|
2860
|
+
##### [find_exact](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/generic.rb#L23) ios
|
1997
2861
|
|
1998
2862
|
> def find_exact(value)
|
1999
2863
|
|
2000
2864
|
Find the first element exactly matching value
|
2001
2865
|
|
2002
|
-
__Parameters:__
|
2866
|
+
__Parameters:__
|
2867
|
+
|
2868
|
+
[String] value - the value to search for
|
2869
|
+
|
2870
|
+
__Returns:__
|
2871
|
+
|
2872
|
+
[Element]
|
2003
2873
|
|
2004
|
-
|
2874
|
+
--
|
2005
2875
|
|
2006
|
-
|
2876
|
+
##### [finds_exact](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/generic.rb#L30) ios
|
2007
2877
|
|
2008
2878
|
> def finds_exact(value)
|
2009
2879
|
|
2010
2880
|
Find all elements exactly matching value
|
2011
2881
|
|
2012
|
-
__Parameters:__
|
2882
|
+
__Parameters:__
|
2013
2883
|
|
2014
|
-
|
2884
|
+
[String] value - the value to search for
|
2885
|
+
|
2886
|
+
__Returns:__
|
2887
|
+
|
2888
|
+
[Array<Element>]
|
2889
|
+
|
2890
|
+
--
|
2015
2891
|
|
2016
|
-
|
2892
|
+
##### [raise_error_if_no_element](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/generic.rb#L37) ios
|
2017
2893
|
|
2018
2894
|
> def raise_error_if_no_element(element)
|
2019
2895
|
|
2020
2896
|
|
2021
2897
|
|
2022
|
-
|
2898
|
+
--
|
2899
|
+
|
2900
|
+
##### [select_visible_elements](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/generic.rb#L45) ios
|
2023
2901
|
|
2024
2902
|
> def select_visible_elements(elements)
|
2025
2903
|
|
2026
2904
|
Return visible elements.
|
2027
2905
|
|
2028
|
-
|
2906
|
+
--
|
2907
|
+
|
2908
|
+
##### [swipe](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/command/gestures.rb#L11) ios
|
2029
2909
|
|
2030
2910
|
> def swipe(direction:, element: nil)
|
2031
2911
|
|
2032
2912
|
|
2033
2913
|
|
2034
|
-
__Parameters:__
|
2914
|
+
__Parameters:__
|
2915
|
+
|
2916
|
+
[string] direction - Either 'up', 'down', 'left' or 'right'.
|
2035
2917
|
|
2036
2918
|
[Hash] opts - a customizable set of options
|
2037
2919
|
|
2038
|
-
|
2920
|
+
--
|
2921
|
+
|
2922
|
+
##### [scroll](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/command/gestures.rb#L31) ios
|
2039
2923
|
|
2040
2924
|
> def scroll(direction:, # rubocop:disable Metrics/ParameterLists
|
2041
2925
|
|
2042
2926
|
|
2043
2927
|
|
2044
|
-
__Parameters:__
|
2928
|
+
__Parameters:__
|
2929
|
+
|
2930
|
+
[string] direction - Either 'up', 'down', 'left' or 'right'.
|
2045
2931
|
|
2046
2932
|
[Hash] opts - a customizable set of options
|
2047
2933
|
|
2048
|
-
|
2934
|
+
--
|
2935
|
+
|
2936
|
+
##### [pinch](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/command/gestures.rb#L56) ios
|
2049
2937
|
|
2050
2938
|
> def pinch(scale:, velocity: 1.0, element: nil)
|
2051
2939
|
|
2052
2940
|
|
2053
2941
|
|
2054
|
-
__Parameters:__
|
2942
|
+
__Parameters:__
|
2943
|
+
|
2944
|
+
[scale] scale - X tap coordinate of type float. Mandatory parameter
|
2055
2945
|
|
2056
2946
|
[float] velocity - Y tap coordinate of type float. Mandatory parameter
|
2057
2947
|
|
2058
2948
|
[Hash] opts - a customizable set of options
|
2059
2949
|
|
2060
|
-
|
2950
|
+
--
|
2951
|
+
|
2952
|
+
##### [double_tap](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/command/gestures.rb#L71) ios
|
2061
2953
|
|
2062
2954
|
> def double_tap(x: nil, y: nil, element: nil) # rubocop:disable Naming/UncommunicativeMethodParamName
|
2063
2955
|
|
2064
2956
|
|
2065
2957
|
|
2066
|
-
__Parameters:__
|
2958
|
+
__Parameters:__
|
2959
|
+
|
2960
|
+
[float] x - X Screen x tap coordinate of type float. Mandatory parameter only if element is not set
|
2067
2961
|
|
2068
2962
|
[float] y - Y Screen y tap coordinate of type float. Mandatory parameter only if element is not set
|
2069
2963
|
|
2070
2964
|
[Hash] opts - a customizable set of options
|
2071
2965
|
|
2072
|
-
|
2966
|
+
--
|
2967
|
+
|
2968
|
+
##### [touch_and_hold](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/command/gestures.rb#L88) ios
|
2073
2969
|
|
2074
2970
|
> def touch_and_hold(x: nil, y: nil, element: nil, duration: 1.0) # rubocop:disable Naming/UncommunicativeMethodParamName
|
2075
2971
|
|
2076
2972
|
|
2077
2973
|
|
2078
|
-
__Parameters:__
|
2974
|
+
__Parameters:__
|
2975
|
+
|
2976
|
+
[float] x - Screen x long tap coordinate of type float. Mandatory parameter only if element is not set
|
2079
2977
|
|
2080
2978
|
[float] y - Screen y long tap coordinate of type float. Mandatory parameter only if element is not set
|
2081
2979
|
|
@@ -2083,37 +2981,49 @@ __Parameters:__\n\n [float] x - Screen x long tap c
|
|
2083
2981
|
|
2084
2982
|
[Hash] opts - a customizable set of options
|
2085
2983
|
|
2086
|
-
|
2984
|
+
--
|
2985
|
+
|
2986
|
+
##### [two_finger_tap](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/command/gestures.rb#L101) ios
|
2087
2987
|
|
2088
2988
|
> def two_finger_tap(element:)
|
2089
2989
|
|
2090
2990
|
|
2091
2991
|
|
2092
|
-
__Parameters:__
|
2992
|
+
__Parameters:__
|
2993
|
+
|
2994
|
+
[Element] element - Element to long tap on.
|
2093
2995
|
|
2094
2996
|
```ruby
|
2095
2997
|
two_finger_tap element: find_element(:accessibility_id, "some item")
|
2096
2998
|
```
|
2097
2999
|
|
2098
|
-
|
3000
|
+
--
|
3001
|
+
|
3002
|
+
##### [tap](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/command/gestures.rb#L116) ios
|
2099
3003
|
|
2100
3004
|
> def tap(x:, y:, element: nil) # rubocop:disable Naming/UncommunicativeMethodParamName
|
2101
3005
|
|
2102
3006
|
|
2103
3007
|
|
2104
|
-
__Parameters:__
|
3008
|
+
__Parameters:__
|
3009
|
+
|
3010
|
+
[float] x - X tap coordinate of type float. Mandatory parameter
|
2105
3011
|
|
2106
3012
|
[float] y - Y tap coordinate of type float. Mandatory parameter
|
2107
3013
|
|
2108
3014
|
[Hash] opts - a customizable set of options
|
2109
3015
|
|
2110
|
-
|
3016
|
+
--
|
3017
|
+
|
3018
|
+
##### [drag_from_to_for_duration](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/command/gestures.rb#L136) ios
|
2111
3019
|
|
2112
3020
|
> def drag_from_to_for_duration(from_x:, from_y:, to_x:, to_y:, duration: 1.0, element: nil)
|
2113
3021
|
|
2114
3022
|
rubocop:disable Metrics/ParameterLists
|
2115
3023
|
|
2116
|
-
__Parameters:__
|
3024
|
+
__Parameters:__
|
3025
|
+
|
3026
|
+
[float] duration - Float number of seconds in range [0.5, 60]. How long the tap gesture at starting
|
2117
3027
|
drag point should be before to start dragging. Mandatory parameter
|
2118
3028
|
|
2119
3029
|
[float] from_x - The x coordinate of starting drag point (type float). Mandatory parameter
|
@@ -2126,31 +3036,41 @@ drag point should be before to start dragging. Mandatory parameter
|
|
2126
3036
|
|
2127
3037
|
[Hash] opts - a customizable set of options
|
2128
3038
|
|
2129
|
-
|
3039
|
+
--
|
3040
|
+
|
3041
|
+
##### [select_picker_wheel](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/command/gestures.rb#L153) ios
|
2130
3042
|
|
2131
3043
|
> def select_picker_wheel(element:, order:, offset: nil)
|
2132
3044
|
|
2133
3045
|
https://github.com/facebook/WebDriverAgent/pull/523
|
2134
3046
|
https://github.com/appium/appium-xcuitest-driver/pull/420
|
2135
3047
|
|
2136
|
-
__Parameters:__
|
3048
|
+
__Parameters:__
|
3049
|
+
|
3050
|
+
[String] order - The order to move picker to. "next" or "previous".
|
2137
3051
|
|
2138
3052
|
[Element] element - Element id to perform select picker wheel on.
|
2139
3053
|
|
2140
3054
|
[Hash] opts - a customizable set of options
|
2141
3055
|
|
2142
|
-
|
3056
|
+
--
|
3057
|
+
|
3058
|
+
##### [alert](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/command/gestures.rb#L171) ios
|
2143
3059
|
|
2144
3060
|
> def alert(action:, button_label: nil)
|
2145
3061
|
|
2146
3062
|
|
2147
3063
|
|
2148
|
-
__Parameters:__
|
3064
|
+
__Parameters:__
|
3065
|
+
|
3066
|
+
[String] action - The following actions are supported: accept, dismiss and getButtons. Mandatory parameter
|
2149
3067
|
|
2150
3068
|
[String] button_label - The label text of an existing alert button to click on.
|
2151
3069
|
This is an optional parameter and is only valid in combination with accept and dismiss actions.
|
2152
3070
|
|
2153
|
-
__Returns:__
|
3071
|
+
__Returns:__
|
3072
|
+
|
3073
|
+
[] {} or Selenium::WebDriver::Error::NoSuchAlertError if no action sheet or alert
|
2154
3074
|
or button labels if action is equal to getButtons.
|
2155
3075
|
|
2156
3076
|
```ruby
|
@@ -2158,23 +3078,33 @@ alert action: "accept"
|
|
2158
3078
|
alert action: "dismiss"
|
2159
3079
|
```
|
2160
3080
|
|
2161
|
-
|
3081
|
+
--
|
3082
|
+
|
3083
|
+
##### [text_field_class](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/textfield.rb#L9) ios
|
2162
3084
|
|
2163
3085
|
> def text_field_class
|
2164
3086
|
|
2165
3087
|
|
2166
3088
|
|
2167
|
-
__Returns:__
|
3089
|
+
__Returns:__
|
3090
|
+
|
3091
|
+
[String] Class name for text field
|
3092
|
+
|
3093
|
+
--
|
2168
3094
|
|
2169
|
-
|
3095
|
+
##### [secure_text_field_class](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/textfield.rb#L14) ios
|
2170
3096
|
|
2171
3097
|
> def secure_text_field_class
|
2172
3098
|
|
2173
3099
|
|
2174
3100
|
|
2175
|
-
__Returns:__
|
3101
|
+
__Returns:__
|
3102
|
+
|
3103
|
+
[String] Class name for secure text field
|
3104
|
+
|
3105
|
+
--
|
2176
3106
|
|
2177
|
-
|
3107
|
+
##### [textfield](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/textfield.rb#L23) ios
|
2178
3108
|
|
2179
3109
|
> def textfield(value)
|
2180
3110
|
|
@@ -2182,77 +3112,117 @@ Find the first TextField that contains value or by index.
|
|
2182
3112
|
Note: Uses XPath
|
2183
3113
|
If int then the TextField at that index is returned.
|
2184
3114
|
|
2185
|
-
__Parameters:__
|
3115
|
+
__Parameters:__
|
2186
3116
|
|
2187
|
-
|
3117
|
+
[String, Integer] value - the text to match exactly.
|
2188
3118
|
|
2189
|
-
|
3119
|
+
__Returns:__
|
3120
|
+
|
3121
|
+
[TextField]
|
3122
|
+
|
3123
|
+
--
|
3124
|
+
|
3125
|
+
##### [textfields](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/textfield.rb#L43) ios
|
2190
3126
|
|
2191
3127
|
> def textfields(value = false)
|
2192
3128
|
|
2193
3129
|
Find all TextFields containing value.
|
2194
3130
|
If value is omitted, all TextFields are returned.
|
2195
3131
|
|
2196
|
-
__Parameters:__
|
3132
|
+
__Parameters:__
|
2197
3133
|
|
2198
|
-
|
3134
|
+
[String] value - the value to search for
|
2199
3135
|
|
2200
|
-
|
3136
|
+
__Returns:__
|
3137
|
+
|
3138
|
+
[Array<TextField>]
|
3139
|
+
|
3140
|
+
--
|
3141
|
+
|
3142
|
+
##### [first_textfield](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/textfield.rb#L52) ios
|
2201
3143
|
|
2202
3144
|
> def first_textfield
|
2203
3145
|
|
2204
3146
|
Find the first TextField.
|
2205
3147
|
|
2206
|
-
__Returns:__
|
3148
|
+
__Returns:__
|
3149
|
+
|
3150
|
+
[TextField]
|
2207
3151
|
|
2208
|
-
|
3152
|
+
--
|
3153
|
+
|
3154
|
+
##### [last_textfield](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/textfield.rb#L58) ios
|
2209
3155
|
|
2210
3156
|
> def last_textfield
|
2211
3157
|
|
2212
3158
|
Find the last TextField.
|
2213
3159
|
|
2214
|
-
__Returns:__
|
3160
|
+
__Returns:__
|
3161
|
+
|
3162
|
+
[TextField]
|
2215
3163
|
|
2216
|
-
|
3164
|
+
--
|
3165
|
+
|
3166
|
+
##### [textfield_exact](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/textfield.rb#L68) ios
|
2217
3167
|
|
2218
3168
|
> def textfield_exact(value)
|
2219
3169
|
|
2220
3170
|
Find the first TextField that exactly matches value.
|
2221
3171
|
|
2222
|
-
__Parameters:__
|
3172
|
+
__Parameters:__
|
3173
|
+
|
3174
|
+
[String] value - the value to match exactly
|
2223
3175
|
|
2224
|
-
__Returns:__
|
3176
|
+
__Returns:__
|
2225
3177
|
|
2226
|
-
|
3178
|
+
[TextField]
|
3179
|
+
|
3180
|
+
--
|
3181
|
+
|
3182
|
+
##### [textfields_exact](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/element/textfield.rb#L75) ios
|
2227
3183
|
|
2228
3184
|
> def textfields_exact(value)
|
2229
3185
|
|
2230
3186
|
Find all TextFields that exactly match value.
|
2231
3187
|
|
2232
|
-
__Parameters:__
|
3188
|
+
__Parameters:__
|
3189
|
+
|
3190
|
+
[String] value - the value to match exactly
|
3191
|
+
|
3192
|
+
__Returns:__
|
3193
|
+
|
3194
|
+
[Array<TextField>]
|
2233
3195
|
|
2234
|
-
|
3196
|
+
--
|
2235
3197
|
|
2236
|
-
|
3198
|
+
##### [set_pasteboard](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/command/pasteboard.rb#L12) ios
|
2237
3199
|
|
2238
3200
|
> def set_pasteboard(content:, encoding: nil)
|
2239
3201
|
|
2240
3202
|
|
2241
3203
|
|
2242
|
-
__Parameters:__
|
3204
|
+
__Parameters:__
|
3205
|
+
|
3206
|
+
[string] content - The content of the pasteboard. The previous content is going to be overridden.
|
2243
3207
|
The parameter is mandatory
|
2244
3208
|
|
2245
3209
|
[Hash] opts - a customizable set of options
|
2246
3210
|
|
2247
|
-
|
3211
|
+
--
|
3212
|
+
|
3213
|
+
##### [get_pasteboard](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/command/pasteboard.rb#L24) ios
|
2248
3214
|
|
2249
3215
|
> def get_pasteboard(encoding: nil)
|
2250
3216
|
|
2251
3217
|
|
2252
3218
|
|
2253
|
-
__Parameters:__
|
3219
|
+
__Parameters:__
|
3220
|
+
|
3221
|
+
[Hash] opts - a customizable set of options
|
2254
3222
|
|
2255
|
-
|
3223
|
+
--
|
3224
|
+
|
3225
|
+
##### [install_certificate](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/command/certificate.rb#L18) ios
|
2256
3226
|
|
2257
3227
|
> def install_certificate(cer_file:)
|
2258
3228
|
|
@@ -2261,15 +3231,21 @@ based on the given PEM certificate content.
|
|
2261
3231
|
https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/iPhoneOTAConfiguration/Introduction/Introduction.html
|
2262
3232
|
https://github.com/appium/appium-xcuitest-driver/pull/652
|
2263
3233
|
|
2264
|
-
__Parameters:__
|
3234
|
+
__Parameters:__
|
3235
|
+
|
3236
|
+
[string] cer_file - The content of the certificate file.
|
2265
3237
|
|
2266
|
-
|
3238
|
+
--
|
3239
|
+
|
3240
|
+
##### [xcuitest_get_contexts](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/command/get_context.rb#L14) ios
|
2267
3241
|
|
2268
3242
|
> def xcuitest_get_contexts
|
2269
3243
|
|
2270
3244
|
Get contexts
|
2271
3245
|
|
2272
|
-
|
3246
|
+
--
|
3247
|
+
|
3248
|
+
##### [xcuitest_install_app](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/command/multi_app_handler.rb#L21) ios
|
2273
3249
|
|
2274
3250
|
> def xcuitest_install_app(app:)
|
2275
3251
|
|
@@ -2278,55 +3254,85 @@ then it's going to be installed over it, which allows to test upgrades.
|
|
2278
3254
|
Be careful while reinstalling the main application under test - make sure you called terminateApp
|
2279
3255
|
for it first, otherwise WebDriverAgent will detect it as a potential application crash.
|
2280
3256
|
|
2281
|
-
__Parameters:__
|
3257
|
+
__Parameters:__
|
3258
|
+
|
3259
|
+
[String] app - The path to an existing .ipa/.app file on the server file system, zipped .app file
|
2282
3260
|
or an URL pointing to a remote .ipa/.zip file. Mandatory argument.
|
2283
3261
|
|
2284
|
-
__Returns:__
|
3262
|
+
__Returns:__
|
3263
|
+
|
3264
|
+
[] {}
|
2285
3265
|
|
2286
|
-
|
3266
|
+
--
|
3267
|
+
|
3268
|
+
##### [xcuitest_app_installed?](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/command/multi_app_handler.rb#L35) ios
|
2287
3269
|
|
2288
3270
|
> def xcuitest_app_installed?(bundle_id:)
|
2289
3271
|
|
2290
3272
|
Verifies whether the application with given bundle identifier is installed on the device.
|
2291
3273
|
|
2292
|
-
__Parameters:__
|
3274
|
+
__Parameters:__
|
3275
|
+
|
3276
|
+
[String] bundle_id - The bundle identifier of the application, which is going to be verified.
|
2293
3277
|
|
2294
|
-
__Returns:__
|
3278
|
+
__Returns:__
|
2295
3279
|
|
2296
|
-
|
3280
|
+
[boolean]
|
3281
|
+
|
3282
|
+
--
|
3283
|
+
|
3284
|
+
##### [xcuitest_remove_app](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/command/multi_app_handler.rb#L50) ios
|
2297
3285
|
|
2298
3286
|
> def xcuitest_remove_app(bundle_id:)
|
2299
3287
|
|
2300
3288
|
Uninstalls an existing application from the device under test. This endpoint does not verify
|
2301
3289
|
whether the application is already installed or not before uninstalling it.
|
2302
3290
|
|
2303
|
-
__Parameters:__
|
3291
|
+
__Parameters:__
|
3292
|
+
|
3293
|
+
[String] bundle_id - The bundle identifier of the application, which is going to be uninstalled.
|
3294
|
+
|
3295
|
+
__Returns:__
|
3296
|
+
|
3297
|
+
[] {}
|
2304
3298
|
|
2305
|
-
|
3299
|
+
--
|
2306
3300
|
|
2307
|
-
|
3301
|
+
##### [xcuitest_launch_app](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/command/multi_app_handler.rb#L65) ios
|
2308
3302
|
|
2309
3303
|
> def xcuitest_launch_app(bundle_id:)
|
2310
3304
|
|
2311
3305
|
Executes an existing application on the device. If the application is already running then
|
2312
3306
|
it will be brought to the foreground.
|
2313
3307
|
|
2314
|
-
__Parameters:__
|
3308
|
+
__Parameters:__
|
2315
3309
|
|
2316
|
-
|
3310
|
+
[String] bundle_id - The bundle identifier of the application, which is going to be executed.
|
2317
3311
|
|
2318
|
-
|
3312
|
+
__Returns:__
|
3313
|
+
|
3314
|
+
[] {}
|
3315
|
+
|
3316
|
+
--
|
3317
|
+
|
3318
|
+
##### [xcuitest_terminate_app](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/command/multi_app_handler.rb#L80) ios
|
2319
3319
|
|
2320
3320
|
> def xcuitest_terminate_app(bundle_id:)
|
2321
3321
|
|
2322
3322
|
Terminates an existing application on the device. If the application is not running then
|
2323
3323
|
the returned result will be false, otherwise true.
|
2324
3324
|
|
2325
|
-
__Parameters:__
|
3325
|
+
__Parameters:__
|
3326
|
+
|
3327
|
+
[String] bundle_id - The bundle identifier of the application, which is going to be terminated.
|
2326
3328
|
|
2327
|
-
__Returns:__
|
3329
|
+
__Returns:__
|
2328
3330
|
|
2329
|
-
|
3331
|
+
[] {}
|
3332
|
+
|
3333
|
+
--
|
3334
|
+
|
3335
|
+
##### [xcuitest_query_app_status](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/command/multi_app_handler.rb#L102) ios
|
2330
3336
|
|
2331
3337
|
> def xcuitest_query_app_status(bundle_id:)
|
2332
3338
|
|
@@ -2340,11 +3346,17 @@ State:
|
|
2340
3346
|
|
2341
3347
|
For more details: https://developer.apple.com/documentation/xctest/xcuiapplicationstate
|
2342
3348
|
|
2343
|
-
__Parameters:__
|
3349
|
+
__Parameters:__
|
3350
|
+
|
3351
|
+
[String] bundle_id - A target app's bundle id
|
3352
|
+
|
3353
|
+
__Returns:__
|
2344
3354
|
|
2345
|
-
|
3355
|
+
[0|1|2|3|4] A number of the state
|
2346
3356
|
|
2347
|
-
|
3357
|
+
--
|
3358
|
+
|
3359
|
+
##### [xcuitest_activate_app](https://github.com/appium/ruby_lib/blob/fa8d4ed2aaa5259a1fa744be955555cf775ead3e/lib/appium_lib/ios/xcuitest/command/multi_app_handler.rb#L118) ios
|
2348
3360
|
|
2349
3361
|
> def xcuitest_activate_app(bundle_id:)
|
2350
3362
|
|
@@ -2352,8 +3364,13 @@ Activates an existing application on the device under test and moves it to the f
|
|
2352
3364
|
The application should be already running in order to activate it.
|
2353
3365
|
The call is ignored if the application is already in foreground.
|
2354
3366
|
|
2355
|
-
__Parameters:__
|
3367
|
+
__Parameters:__
|
3368
|
+
|
3369
|
+
[String] bundle_id - The bundle identifier of the application, which is going to be brought to the foreground.
|
3370
|
+
|
3371
|
+
__Returns:__
|
3372
|
+
|
3373
|
+
[] {}
|
2356
3374
|
|
2357
|
-
|
3375
|
+
--
|
2358
3376
|
|
2359
|
-
--\n\n
|