appium_lib 15.0.0 → 15.2.0

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