appium_lib 14.0.0 → 15.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/docs/ios_docs.md DELETED
@@ -1,3321 +0,0 @@
1
- ##### [load_settings](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/appium.rb#L60) 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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/appium.rb#L108) 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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/appium.rb#L113) 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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/appium.rb#L155) 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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/appium.rb#L209) 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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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;[TouchAction|Selenium::WebDriver::PointerActions]
396
-
397
- --
398
-
399
- ##### [appium_server_version](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/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/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/driver.rb#L797) common
855
-
856
- > def log_event(vendor:, event:)
857
-
858
- Logs a custom event. The event is available via {::Appium::Core::Events#get} or
859
- <code>driver.session_capabilities['events']</code> with <code>eventTimings</code> capabilities.
860
-
861
- __Parameters:__
862
-
863
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] vendor - The vendor prefix for the event
864
-
865
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] event - The name of event
866
-
867
- __Returns:__
868
-
869
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[nil]
870
-
871
- --
872
-
873
- ##### [log_event=](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/driver.rb#L801) common
874
-
875
- > def log_event=(log_event)
876
-
877
-
878
-
879
- --
880
-
881
- ##### [log_events](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/driver.rb#L820) common
882
-
883
- > def log_events(type = nil)
884
-
885
- Returns events with filtering with 'type'. Defaults to all available events.
886
-
887
- __Parameters:__
888
-
889
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] type - The type of events to get
890
-
891
- __Returns:__
892
-
893
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash]
894
-
895
- --
896
-
897
- ##### [x](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/driver.rb#L827) common
898
-
899
- > def x
900
-
901
- Quit the driver and Pry.
902
- quit and exit are reserved by Pry.
903
-
904
- __Returns:__
905
-
906
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void]
907
-
908
- --
909
-
910
- ##### [username](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/sauce_labs.rb#L18) common
911
-
912
- > def username
913
-
914
- Username for use on Sauce Labs. Set `false` to disable Sauce, even when SAUCE_USERNAME is in ENV.
915
-
916
- --
917
-
918
- ##### [access_key](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/sauce_labs.rb#L20) common
919
-
920
- > def access_key
921
-
922
- Access Key for use on Sauce Labs. Set `false` to disable Sauce, even when SAUCE_ACCESS_KEY is in ENV.
923
-
924
- --
925
-
926
- ##### [endpoint](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/sauce_labs.rb#L22) common
927
-
928
- > def endpoint
929
-
930
- Override the Sauce Appium endpoint to allow e.g. TestObject tests. Default is 'ondemand.saucelabs.com:443/wd/hub'.
931
-
932
- --
933
-
934
- ##### [initialize](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/sauce_labs.rb#L47) common
935
-
936
- > def initialize(appium_lib_opts)
937
-
938
- Create a SauceLabs instance to manage sauce labs related attributes.
939
-
940
- __Parameters:__
941
-
942
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] appium_lib_opts - Appium library parameter
943
-
944
- __Returns:__
945
-
946
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Appium::SauceLabs]
947
-
948
- --
949
-
950
- ##### [sauce_server_url?](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/sauce_labs.rb#L67) common
951
-
952
- > def sauce_server_url?
953
-
954
- Return true if an instance of Appium::SauceLabs has sauce_username and sauce_access_key.
955
-
956
- __Returns:__
957
-
958
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Boolean]
959
-
960
- --
961
-
962
- ##### [server_url](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/sauce_labs.rb#L80) common
963
-
964
- > def server_url
965
-
966
- Return a particular server url to access to. Default is the local address.
967
-
968
- __Returns:__
969
-
970
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String]
971
-
972
- --
973
-
974
- ##### [get_log](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/log.rb#L25) common
975
-
976
- > def get_log(type)
977
-
978
-
979
-
980
- __Parameters:__
981
-
982
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String|Hash] type - You can get particular type's logs.
983
-
984
- __Returns:__
985
-
986
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Selenium::WebDriver::LogEntry]] A list of logs data.
987
-
988
- --
989
-
990
- ##### [get_available_log_types](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/log.rb#L37) common
991
-
992
- > def get_available_log_types
993
-
994
- Get a list of available log types
995
-
996
- __Returns:__
997
-
998
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[String]] A list of available log types.
999
-
1000
- --
1001
-
1002
- ##### [wait_true](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/wait.rb#L44) common
1003
-
1004
- > def wait_true(opts = {})
1005
-
1006
- Check every interval seconds to see if yield returns a truthy value.
1007
- Note this isn't a strict boolean true, any truthy value is accepted.
1008
- false and nil are considered failures.
1009
- Give up after timeout seconds.
1010
-
1011
- Wait code from the selenium Ruby gem
1012
- https://github.com/SeleniumHQ/selenium/blob/cf501dda3f0ed12233de51ce8170c0e8090f0c20/rb/lib/selenium/webdriver/common/wait.rb
1013
-
1014
- If only a number is provided then it's treated as the timeout value.
1015
-
1016
- __Parameters:__
1017
-
1018
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash|Numeric] opts - Options. If the value is _Numeric_, the value is set as `{ timeout: value }`
1019
-
1020
- --
1021
-
1022
- ##### [wait](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/wait.rb#L73) common
1023
-
1024
- > def wait(opts = {})
1025
-
1026
- Check every interval seconds to see if yield doesn't raise an exception.
1027
- Give up after timeout seconds.
1028
-
1029
- Wait code from the selenium Ruby gem
1030
- https://github.com/SeleniumHQ/selenium/blob/cf501dda3f0ed12233de51ce8170c0e8090f0c20/rb/lib/selenium/webdriver/common/wait.rb
1031
-
1032
- If only a number is provided then it's treated as the timeout value.
1033
-
1034
- __Parameters:__
1035
-
1036
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash|Numeric] opts - Options. If the value is _Numeric_, the value is set as `{ timeout: value }`
1037
-
1038
- --
1039
-
1040
- ##### [add_touch_actions](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/device.rb#L26) common
1041
-
1042
- > def add_touch_actions
1043
-
1044
-
1045
-
1046
- --
1047
-
1048
- ##### [delegate_from_appium_driver](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/device.rb#L38) common
1049
-
1050
- > def delegate_from_appium_driver(method, delegation_target)
1051
-
1052
-
1053
-
1054
- --
1055
-
1056
- ##### [ignore](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L30) common
1057
-
1058
- > def ignore
1059
-
1060
- Return yield and ignore any exceptions.
1061
-
1062
- --
1063
-
1064
- ##### [back](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L38) common
1065
-
1066
- > def back
1067
-
1068
- Navigate back.
1069
-
1070
- __Returns:__
1071
-
1072
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void]
1073
-
1074
- --
1075
-
1076
- ##### [session_id](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L49) common
1077
-
1078
- > def session_id
1079
-
1080
- For Sauce Labs reporting. Returns the current session id.
1081
-
1082
- __Returns:__
1083
-
1084
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String]
1085
-
1086
- --
1087
-
1088
- ##### [xpath](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L57) common
1089
-
1090
- > def xpath(xpath_str)
1091
-
1092
- Returns the first element that matches the provided xpath.
1093
-
1094
- __Parameters:__
1095
-
1096
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] xpath_str - the XPath string
1097
-
1098
- __Returns:__
1099
-
1100
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1101
-
1102
- --
1103
-
1104
- ##### [xpaths](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L65) common
1105
-
1106
- > def xpaths(xpath_str)
1107
-
1108
- Returns all elements that match the provided xpath.
1109
-
1110
- __Parameters:__
1111
-
1112
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] xpath_str - the XPath string
1113
-
1114
- __Returns:__
1115
-
1116
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>]
1117
-
1118
- --
1119
-
1120
- ##### [result](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L75) common
1121
-
1122
- > def result
1123
-
1124
- Returns the value of attribute result.
1125
-
1126
- --
1127
-
1128
- ##### [initialize](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L77) common
1129
-
1130
- > def initialize(platform)
1131
-
1132
- rubocop:disable Lint/MissingSuper
1133
-
1134
- __Returns:__
1135
-
1136
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[CountElements] a new instance of CountElements
1137
-
1138
- --
1139
-
1140
- ##### [reset](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L82) common
1141
-
1142
- > def reset
1143
-
1144
-
1145
-
1146
- --
1147
-
1148
- ##### [start_element](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L87) common
1149
-
1150
- > def start_element(name, attrs = [])
1151
-
1152
- http://nokogiri.org/Nokogiri/XML/SAX/Document.html
1153
-
1154
- --
1155
-
1156
- ##### [formatted_result](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L98) common
1157
-
1158
- > def formatted_result
1159
-
1160
-
1161
-
1162
- --
1163
-
1164
- ##### [get_page_class](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L116) common
1165
-
1166
- > def get_page_class
1167
-
1168
- Returns a string of class counts of visible elements.
1169
-
1170
- __Returns:__
1171
-
1172
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String]
1173
-
1174
- --
1175
-
1176
- ##### [page_class](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L141) common
1177
-
1178
- > def page_class
1179
-
1180
- Count all classes on screen and print to stdout.
1181
- Useful for appium_console.
1182
-
1183
- __Returns:__
1184
-
1185
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[nil]
1186
-
1187
- --
1188
-
1189
- ##### [source](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L148) common
1190
-
1191
- > def source
1192
-
1193
- Prints xml of the current page
1194
-
1195
- __Returns:__
1196
-
1197
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void]
1198
-
1199
- --
1200
-
1201
- ##### [get_source](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L155) common
1202
-
1203
- > def get_source
1204
-
1205
- Returns XML string for the current page
1206
- Same as driver.page_source
1207
-
1208
- __Returns:__
1209
-
1210
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String]
1211
-
1212
- --
1213
-
1214
- ##### [px_to_window_rel](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L165) common
1215
-
1216
- > def px_to_window_rel(opts = {}, driver = $driver)
1217
-
1218
- Converts pixel values to window relative values
1219
-
1220
- --
1221
-
1222
- ##### [xml_keys](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L184) common
1223
-
1224
- > def xml_keys(target)
1225
-
1226
- Search strings.xml's values for target.
1227
-
1228
- __Parameters:__
1229
-
1230
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] target - the target to search for in strings.xml values
1231
-
1232
- __Returns:__
1233
-
1234
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array]
1235
-
1236
- --
1237
-
1238
- ##### [xml_values](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L192) common
1239
-
1240
- > def xml_values(target)
1241
-
1242
- Search strings.xml's keys for target.
1243
-
1244
- __Parameters:__
1245
-
1246
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] target - the target to search for in strings.xml keys
1247
-
1248
- __Returns:__
1249
-
1250
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array]
1251
-
1252
- --
1253
-
1254
- ##### [resolve_id](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L200) common
1255
-
1256
- > def resolve_id(id)
1257
-
1258
- Resolve id in strings.xml and return the value.
1259
-
1260
- __Parameters:__
1261
-
1262
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] id - the id to resolve
1263
-
1264
- __Returns:__
1265
-
1266
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String]
1267
-
1268
- --
1269
-
1270
- ##### [filter](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L207) common
1271
-
1272
- > def filter
1273
-
1274
- Returns the value of attribute filter.
1275
-
1276
- --
1277
-
1278
- ##### [filter=](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L210) common
1279
-
1280
- > def filter=(value)
1281
-
1282
- convert to string to support symbols
1283
-
1284
- --
1285
-
1286
- ##### [initialize](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L217) common
1287
-
1288
- > def initialize
1289
-
1290
- rubocop:disable Lint/MissingSuper
1291
-
1292
- __Returns:__
1293
-
1294
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[HTMLElements] a new instance of HTMLElements
1295
-
1296
- --
1297
-
1298
- ##### [reset](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L222) common
1299
-
1300
- > def reset
1301
-
1302
-
1303
-
1304
- --
1305
-
1306
- ##### [result](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L228) common
1307
-
1308
- > def result
1309
-
1310
-
1311
-
1312
- --
1313
-
1314
- ##### [start_element](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L242) common
1315
-
1316
- > def start_element(name, attrs = [])
1317
-
1318
-
1319
-
1320
- --
1321
-
1322
- ##### [end_element](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L252) common
1323
-
1324
- > def end_element(name)
1325
-
1326
-
1327
-
1328
- --
1329
-
1330
- ##### [characters](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/helper.rb#L259) common
1331
-
1332
- > def characters(chars)
1333
-
1334
-
1335
-
1336
- --
1337
-
1338
- ##### [pinch](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/multi_touch.rb#L65) common
1339
-
1340
- > def pinch(percentage = 25, auto_perform = true, driver = $driver)
1341
-
1342
- Convenience method for pinching the screen.
1343
- Places two fingers at the edges of the screen and brings them together.
1344
- Without auto_perform
1345
-
1346
- With driver
1347
-
1348
- __Parameters:__
1349
-
1350
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[int] percentage - The percent size by which to shrink the screen when pinched.
1351
-
1352
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[boolean] auto_perform - Whether to perform the action immediately (default true)
1353
-
1354
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Driver] driver - Set a driver to conduct the action. DEfault is global driver($driver)
1355
-
1356
- --
1357
-
1358
- ##### [zoom](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/multi_touch.rb#L108) common
1359
-
1360
- > def zoom(percentage = 200, auto_perform = true, driver = $driver)
1361
-
1362
- Convenience method for zooming the screen.
1363
- Places two fingers at the edges of the screen and brings them together.
1364
- Without auto_perform
1365
-
1366
- With driver
1367
-
1368
- __Parameters:__
1369
-
1370
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[int] percentage - The percent size by which to shrink the screen when pinched.
1371
-
1372
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[boolean] auto_perform - Whether to perform the action immediately (default true)
1373
-
1374
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Driver] driver - Set a driver to conduct the action. DEfault is global driver($driver)
1375
-
1376
- --
1377
-
1378
- ##### [initialize](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/multi_touch.rb#L194) common
1379
-
1380
- > def initialize(driver = $driver)
1381
-
1382
- self
1383
-
1384
- __Returns:__
1385
-
1386
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[MultiTouch] a new instance of MultiTouch
1387
-
1388
- --
1389
-
1390
- ##### [initialize](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/touch_actions.rb#L62) common
1391
-
1392
- > def initialize(driver = $driver)
1393
-
1394
-
1395
-
1396
- __Returns:__
1397
-
1398
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[TouchAction] a new instance of TouchAction
1399
-
1400
- --
1401
-
1402
- ##### [swipe](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/touch_actions.rb#L66) common
1403
-
1404
- > def swipe(opts)
1405
-
1406
-
1407
-
1408
- --
1409
-
1410
- ##### [initialize](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/command/ws_logcat.rb#L19) common
1411
-
1412
- > def initialize(url:, output_file: 'logcat.log')
1413
-
1414
-
1415
-
1416
- __Returns:__
1417
-
1418
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[WsLogcat] a new instance of WsLogcat
1419
-
1420
- --
1421
-
1422
- ##### [handle_message_data](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/common/command/ws_logcat.rb#L24) common
1423
-
1424
- > def handle_message_data(data)
1425
-
1426
-
1427
-
1428
- --
1429
-
1430
- ##### [for](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/ios.rb#L29) ios
1431
-
1432
- > def for(target)
1433
-
1434
-
1435
-
1436
- --
1437
-
1438
- ##### [static_text_class](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/text.rb#L25) ios
1439
-
1440
- > def static_text_class
1441
-
1442
-
1443
-
1444
- __Returns:__
1445
-
1446
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] Class name for text
1447
-
1448
- --
1449
-
1450
- ##### [text](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/text.rb#L33) ios
1451
-
1452
- > def text(value)
1453
-
1454
- Find the first UIAStaticText|XCUIElementTypeStaticText that contains value or by index.
1455
- If int then the UIAStaticText|XCUIElementTypeStaticText at that index is returned.
1456
-
1457
- __Parameters:__
1458
-
1459
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String, Integer] value - the value to find.
1460
-
1461
- __Returns:__
1462
-
1463
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIA_STATIC_TEXT|XCUIELEMENT_TYPE_STATIC_TEXT]
1464
-
1465
- --
1466
-
1467
- ##### [texts](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/text.rb#L43) ios
1468
-
1469
- > def texts(value = false)
1470
-
1471
- Find all UIAStaticTexts|XCUIElementTypeStaticTexts containing value.
1472
- If value is omitted, all UIAStaticTexts|XCUIElementTypeStaticTexts are returned
1473
-
1474
- __Parameters:__
1475
-
1476
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
1477
-
1478
- __Returns:__
1479
-
1480
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<UIA_STATIC_TEXT|XCUIELEMENT_TYPE_STATIC_TEXT>]
1481
-
1482
- --
1483
-
1484
- ##### [first_text](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/text.rb#L51) ios
1485
-
1486
- > def first_text
1487
-
1488
- Find the first UIAStaticText|XCUIElementTypeStaticText.
1489
-
1490
- __Returns:__
1491
-
1492
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIA_STATIC_TEXT|XCUIELEMENT_TYPE_STATIC_TEXT]
1493
-
1494
- --
1495
-
1496
- ##### [last_text](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/text.rb#L57) ios
1497
-
1498
- > def last_text
1499
-
1500
- Find the last UIAStaticText|XCUIElementTypeStaticText.
1501
-
1502
- __Returns:__
1503
-
1504
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIA_STATIC_TEXT|XCUIELEMENT_TYPE_STATIC_TEXT]
1505
-
1506
- --
1507
-
1508
- ##### [text_exact](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/text.rb#L64) ios
1509
-
1510
- > def text_exact(value)
1511
-
1512
- Find the first UIAStaticText|XCUIElementTypeStaticText that exactly matches value.
1513
-
1514
- __Parameters:__
1515
-
1516
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly
1517
-
1518
- __Returns:__
1519
-
1520
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIA_STATIC_TEXT|XCUIElementTypeStaticText]
1521
-
1522
- --
1523
-
1524
- ##### [texts_exact](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/text.rb#L71) ios
1525
-
1526
- > def texts_exact(value)
1527
-
1528
- Find all UIAStaticTexts|XCUIElementTypeStaticTexts that exactly match value.
1529
-
1530
- __Parameters:__
1531
-
1532
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly
1533
-
1534
- __Returns:__
1535
-
1536
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<UIA_STATIC_TEXT|XCUIElementTypeStaticText>]
1537
-
1538
- --
1539
-
1540
- ##### [filter](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L19) ios
1541
-
1542
- > def filter
1543
-
1544
- Returns the value of attribute filter.
1545
-
1546
- --
1547
-
1548
- ##### [filter=](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L19) ios
1549
-
1550
- > def filter=(value)
1551
-
1552
- Sets the attribute filter
1553
-
1554
- __Parameters:__
1555
-
1556
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[] value - the value to set the attribute filter to.
1557
-
1558
- --
1559
-
1560
- ##### [start_element](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L21) ios
1561
-
1562
- > def start_element(type, attrs = [])
1563
-
1564
-
1565
-
1566
- --
1567
-
1568
- ##### [ios_password](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L58) ios
1569
-
1570
- > def ios_password(length = 1)
1571
-
1572
- iOS only. On Android uiautomator always returns an empty string for EditText password.
1573
-
1574
- Password character returned from value of UIASecureTextField
1575
-
1576
- __Parameters:__
1577
-
1578
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Integer] length - the length of the password to generate
1579
-
1580
- __Returns:__
1581
-
1582
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] the returned string is of size length
1583
-
1584
- --
1585
-
1586
- ##### [page](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L74) ios
1587
-
1588
- > def page(opts = {})
1589
-
1590
- Prints a string of interesting elements to the console.
1591
-
1592
- __Parameters:__
1593
-
1594
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] visible - a customizable set of options
1595
-
1596
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] class - a customizable set of options
1597
-
1598
- __Returns:__
1599
-
1600
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void]
1601
-
1602
- --
1603
-
1604
- ##### [id](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L101) ios
1605
-
1606
- > def id(id)
1607
-
1608
- Find by id
1609
-
1610
- __Parameters:__
1611
-
1612
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] id - the id to search for
1613
-
1614
- __Returns:__
1615
-
1616
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1617
-
1618
- --
1619
-
1620
- ##### [ele_index](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L109) ios
1621
-
1622
- > def ele_index(class_name, index)
1623
-
1624
- Get the element of type class_name at matching index.
1625
-
1626
- __Parameters:__
1627
-
1628
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class name to find
1629
-
1630
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Integer] index - the index
1631
-
1632
- __Returns:__
1633
-
1634
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1635
-
1636
- --
1637
-
1638
- ##### [find_ele_by_attr](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L139) ios
1639
-
1640
- > def find_ele_by_attr(class_name, attr, value)
1641
-
1642
- Find the first element exactly matching class and attribute value.
1643
- Note: Uses XPath
1644
- Note: For XCUITest, this method return ALL elements include displayed or not displayed elements.
1645
-
1646
- __Parameters:__
1647
-
1648
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class name to search for
1649
-
1650
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] attr - the attribute to inspect
1651
-
1652
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the expected value of the attribute
1653
-
1654
- __Returns:__
1655
-
1656
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1657
-
1658
- --
1659
-
1660
- ##### [find_eles_by_attr](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L150) ios
1661
-
1662
- > def find_eles_by_attr(class_name, attr, value)
1663
-
1664
- Find all elements exactly matching class and attribute value.
1665
- Note: Uses XPath
1666
- Note: For XCUITest, this method return ALL elements include displayed or not displayed elements.
1667
-
1668
- __Parameters:__
1669
-
1670
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class name to match
1671
-
1672
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] attr - the attribute to compare
1673
-
1674
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value of the attribute that the element must have
1675
-
1676
- __Returns:__
1677
-
1678
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>]
1679
-
1680
- --
1681
-
1682
- ##### [find_ele_by_predicate](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L163) ios
1683
-
1684
- > def find_ele_by_predicate(class_name: '*', value:)
1685
-
1686
- Find the first element exactly matching attribute case insensitive value.
1687
- Note: Uses Predicate
1688
-
1689
- __Parameters:__
1690
-
1691
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the expected value of the attribute
1692
-
1693
- __Returns:__
1694
-
1695
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1696
-
1697
- --
1698
-
1699
- ##### [find_eles_by_predicate](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L175) ios
1700
-
1701
- > def find_eles_by_predicate(class_name: '*', value:)
1702
-
1703
- Find all elements exactly matching attribute case insensitive value.
1704
- Note: Uses Predicate
1705
-
1706
- __Parameters:__
1707
-
1708
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value of the attribute that the element must have
1709
-
1710
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the tag name to match
1711
-
1712
- __Returns:__
1713
-
1714
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>]
1715
-
1716
- --
1717
-
1718
- ##### [find_ele_by_attr_include](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L191) ios
1719
-
1720
- > def find_ele_by_attr_include(class_name, attr, value)
1721
-
1722
- Get the first tag by attribute that exactly matches value.
1723
- Note: Uses XPath
1724
-
1725
- __Parameters:__
1726
-
1727
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the tag name to match
1728
-
1729
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] attr - the attribute to compare
1730
-
1731
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value of the attribute that the element must include
1732
-
1733
- __Returns:__
1734
-
1735
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] the element of type tag who's attribute includes value
1736
-
1737
- --
1738
-
1739
- ##### [find_eles_by_attr_include](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L201) ios
1740
-
1741
- > def find_eles_by_attr_include(class_name, attr, value)
1742
-
1743
- Get tags by attribute that include value.
1744
- Note: Uses XPath
1745
-
1746
- __Parameters:__
1747
-
1748
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the tag name to match
1749
-
1750
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] attr - the attribute to compare
1751
-
1752
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value of the attribute that the element must include
1753
-
1754
- __Returns:__
1755
-
1756
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>] the elements of type tag who's attribute includes value
1757
-
1758
- --
1759
-
1760
- ##### [find_ele_by_predicate_include](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L209) ios
1761
-
1762
- > def find_ele_by_predicate_include(class_name: '*', value:)
1763
-
1764
- Get the first elements that include insensitive value.
1765
- Note: Uses Predicate
1766
-
1767
- __Parameters:__
1768
-
1769
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value of the attribute that the element must include
1770
-
1771
- __Returns:__
1772
-
1773
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] the element of type tag who's attribute includes value
1774
-
1775
- --
1776
-
1777
- ##### [find_eles_by_predicate_include](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L221) ios
1778
-
1779
- > def find_eles_by_predicate_include(class_name: '*', value:)
1780
-
1781
- Get elements that include case insensitive value.
1782
- Note: Uses Predicate
1783
-
1784
- __Parameters:__
1785
-
1786
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value of the attribute that the element must include
1787
-
1788
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the tag name to match
1789
-
1790
- __Returns:__
1791
-
1792
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>] the elements of type tag who's attribute includes value
1793
-
1794
- --
1795
-
1796
- ##### [first_ele](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L234) ios
1797
-
1798
- > def first_ele(class_name)
1799
-
1800
- Get the first tag that matches class_name
1801
-
1802
- __Parameters:__
1803
-
1804
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the tag to match
1805
-
1806
- __Returns:__
1807
-
1808
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1809
-
1810
- --
1811
-
1812
- ##### [last_ele](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L241) ios
1813
-
1814
- > def last_ele(class_name)
1815
-
1816
- Get the last tag that matches class_name
1817
-
1818
- __Parameters:__
1819
-
1820
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the tag to match
1821
-
1822
- __Returns:__
1823
-
1824
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1825
-
1826
- --
1827
-
1828
- ##### [tag](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L249) ios
1829
-
1830
- > def tag(class_name)
1831
-
1832
- Returns the first **visible** element matching class_name
1833
-
1834
- __Parameters:__
1835
-
1836
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class_name to search for
1837
-
1838
- __Returns:__
1839
-
1840
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1841
-
1842
- --
1843
-
1844
- ##### [tags](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L257) ios
1845
-
1846
- > def tags(class_name)
1847
-
1848
- Returns all visible elements matching class_name
1849
-
1850
- __Parameters:__
1851
-
1852
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class_name to search for
1853
-
1854
- __Returns:__
1855
-
1856
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1857
-
1858
- --
1859
-
1860
- ##### [tags_include](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L268) ios
1861
-
1862
- > def tags_include(class_names:, value: nil)
1863
-
1864
- Returns all visible elements matching class_names and value
1865
- This method calls find_element/s and element.value/text many times.
1866
- So, if you set many class_names, this method's performance become worse.
1867
-
1868
- __Parameters:__
1869
-
1870
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array[String]] class_names - the class_names to search for
1871
-
1872
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
1873
-
1874
- __Returns:__
1875
-
1876
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array[Element]]
1877
-
1878
- --
1879
-
1880
- ##### [tags_exact](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L283) ios
1881
-
1882
- > def tags_exact(class_names:, value: nil)
1883
-
1884
- Returns all visible elements matching class_names and value.
1885
- This method calls find_element/s and element.value/text many times.
1886
- So, if you set many class_names, this method's performance become worse.
1887
-
1888
- __Parameters:__
1889
-
1890
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array[String]] class_names - the class_names to search for
1891
-
1892
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
1893
-
1894
- __Returns:__
1895
-
1896
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array[Element]]
1897
-
1898
- --
1899
-
1900
- ##### [ele_by_json_visible_contains](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L320) ios
1901
-
1902
- > def ele_by_json_visible_contains(element, value)
1903
-
1904
- Find the first element that contains value.
1905
- For Appium(automation name), not XCUITest
1906
-
1907
- __Parameters:__
1908
-
1909
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] element - the class name for the element
1910
-
1911
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
1912
-
1913
- __Returns:__
1914
-
1915
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1916
-
1917
- --
1918
-
1919
- ##### [eles_by_json_visible_contains](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L329) ios
1920
-
1921
- > def eles_by_json_visible_contains(element, value)
1922
-
1923
- Find all elements containing value
1924
- For Appium(automation name), not XCUITest
1925
-
1926
- __Parameters:__
1927
-
1928
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] element - the class name for the element
1929
-
1930
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
1931
-
1932
- __Returns:__
1933
-
1934
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>]
1935
-
1936
- --
1937
-
1938
- ##### [ele_by_json_visible_exact](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L359) ios
1939
-
1940
- > def ele_by_json_visible_exact(element, value)
1941
-
1942
- Find the first element exactly matching value
1943
- For Appium(automation name), not XCUITest
1944
-
1945
- __Parameters:__
1946
-
1947
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] element - the class name for the element
1948
-
1949
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
1950
-
1951
- __Returns:__
1952
-
1953
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1954
-
1955
- --
1956
-
1957
- ##### [eles_by_json_visible_exact](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L368) ios
1958
-
1959
- > def eles_by_json_visible_exact(element, value)
1960
-
1961
- Find all elements exactly matching value
1962
- For Appium(automation name), not XCUITest
1963
-
1964
- __Parameters:__
1965
-
1966
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] element - the class name for the element
1967
-
1968
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
1969
-
1970
- __Returns:__
1971
-
1972
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1973
-
1974
- --
1975
-
1976
- ##### [_all_pred](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L377) ios
1977
-
1978
- > def _all_pred(opts)
1979
-
1980
- predicate - the predicate to evaluate on the main app
1981
-
1982
- visible - if true, only visible elements are returned. default true
1983
-
1984
- --
1985
-
1986
- ##### [ele_with_pred](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L391) ios
1987
-
1988
- > def ele_with_pred(opts)
1989
-
1990
- returns element matching predicate contained in the main app
1991
-
1992
- predicate - the predicate to evaluate on the main app
1993
-
1994
- visible - if true, only visible elements are returned. default true
1995
-
1996
- __Returns:__
1997
-
1998
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1999
-
2000
- --
2001
-
2002
- ##### [eles_with_pred](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L402) ios
2003
-
2004
- > def eles_with_pred(opts)
2005
-
2006
- returns elements matching predicate contained in the main app
2007
-
2008
- predicate - the predicate to evaluate on the main app
2009
-
2010
- visible - if true, only visible elements are returned. default true
2011
-
2012
- __Returns:__
2013
-
2014
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>]
2015
-
2016
- --
2017
-
2018
- ##### [_validate_object](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L406) ios
2019
-
2020
- > def _validate_object(*objects)
2021
-
2022
-
2023
-
2024
- --
2025
-
2026
- ##### [_by_json](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L456) ios
2027
-
2028
- > def _by_json(opts)
2029
-
2030
- For Appium(automation name), not XCUITest
2031
- typeArray - array of string types to search for. Example: ["UIAStaticText"]
2032
- onlyFirst - boolean. returns only the first result if true. Example: true
2033
- onlyVisible - boolean. returns only visible elements if true. Example: true
2034
- target - string. the target value to search for. Example: "Buttons, Various uses of UIButton"
2035
- substring - boolean. matches on substrings if true otherwise an exact mathc is required. Example: true
2036
- insensitive - boolean. ignores case sensitivity if true otherwise it's case sensitive. Example: true
2037
-
2038
- opts = {
2039
- typeArray: ["UIAStaticText"],
2040
- onlyFirst: true,
2041
- onlyVisible: true,
2042
- name: {
2043
- target: "Buttons, Various uses of UIButton",
2044
- substring: false,
2045
- insensitive: false,
2046
- },
2047
- label: {
2048
- target: "Buttons, Various uses of UIButton",
2049
- substring: false,
2050
- insensitive: false,
2051
- },
2052
- value: {
2053
- target: "Buttons, Various uses of UIButton",
2054
- substring: false,
2055
- insensitive: false,
2056
- }
2057
- }
2058
-
2059
- --
2060
-
2061
- ##### [eles_by_json](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L506) ios
2062
-
2063
- > def eles_by_json(opts)
2064
-
2065
- For Appium(automation name), not XCUITest
2066
- example usage:
2067
-
2068
- eles_by_json({
2069
- typeArray: ["UIAStaticText"],
2070
- onlyVisible: true,
2071
- name: {
2072
- target: "Buttons, Various uses of UIButton",
2073
- substring: false,
2074
- insensitive: false,
2075
- },
2076
- })
2077
-
2078
- --
2079
-
2080
- ##### [ele_by_json](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/common/helper.rb#L512) ios
2081
-
2082
- > def ele_by_json(opts)
2083
-
2084
- see eles_by_json
2085
-
2086
- --
2087
-
2088
- ##### [alert_accept](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/alert.rb#L19) ios
2089
-
2090
- > def alert_accept
2091
-
2092
- Accept the alert.
2093
-
2094
- __Returns:__
2095
-
2096
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void]
2097
-
2098
- --
2099
-
2100
- ##### [alert_dismiss](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/alert.rb#L27) ios
2101
-
2102
- > def alert_dismiss
2103
-
2104
- Dismiss the alert.
2105
-
2106
- __Returns:__
2107
-
2108
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void]
2109
-
2110
- --
2111
-
2112
- ##### [button_class](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/button.rb#L25) ios
2113
-
2114
- > def button_class
2115
-
2116
-
2117
-
2118
- __Returns:__
2119
-
2120
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] Class name for button
2121
-
2122
- --
2123
-
2124
- ##### [button](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/button.rb#L33) ios
2125
-
2126
- > def button(value)
2127
-
2128
- Find the first UIAButton|XCUIElementTypeButton that contains value or by index.
2129
- If int then the UIAButton|XCUIElementTypeButton at that index is returned.
2130
-
2131
- __Parameters:__
2132
-
2133
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String, Integer] value - the value to exactly match.
2134
-
2135
- __Returns:__
2136
-
2137
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIA_BUTTON|XCUIELEMENT_TYPE_BUTTON]
2138
-
2139
- --
2140
-
2141
- ##### [buttons](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/button.rb#L44) ios
2142
-
2143
- > def buttons(value = false)
2144
-
2145
- Find all UIAButtons|XCUIElementTypeButtons containing value.
2146
- If value is omitted, all UIAButtons|XCUIElementTypeButtons are returned.
2147
-
2148
- __Parameters:__
2149
-
2150
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2151
-
2152
- __Returns:__
2153
-
2154
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<UIA_BUTTON|XCUIELEMENT_TYPE_BUTTON>]
2155
-
2156
- --
2157
-
2158
- ##### [first_button](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/button.rb#L52) ios
2159
-
2160
- > def first_button
2161
-
2162
- Find the first UIAButton|XCUIElementTypeButton.
2163
-
2164
- __Returns:__
2165
-
2166
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIA_BUTTON|XCUIELEMENT_TYPE_BUTTON]
2167
-
2168
- --
2169
-
2170
- ##### [last_button](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/button.rb#L60) ios
2171
-
2172
- > def last_button
2173
-
2174
- TODO: add documentation regarding previous element.
2175
- Previous UIAElement is differ from UIAButton|XCUIElementTypeButton. So, the results are different.
2176
- Find the last UIAButton|XCUIElementTypeButton.
2177
-
2178
- __Returns:__
2179
-
2180
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIA_BUTTON|XCUIELEMENT_TYPE_BUTTON]
2181
-
2182
- --
2183
-
2184
- ##### [button_exact](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/button.rb#L67) ios
2185
-
2186
- > def button_exact(value)
2187
-
2188
- Find the first UIAButton|XCUIElementTypeButton that exactly matches value.
2189
-
2190
- __Parameters:__
2191
-
2192
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly
2193
-
2194
- __Returns:__
2195
-
2196
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIA_BUTTON|XCUIELEMENT_TYPE_BUTTON]
2197
-
2198
- --
2199
-
2200
- ##### [buttons_exact](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/button.rb#L74) ios
2201
-
2202
- > def buttons_exact(value)
2203
-
2204
- Find all UIAButtons|XCUIElementTypeButtons that exactly match value.
2205
-
2206
- __Parameters:__
2207
-
2208
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly
2209
-
2210
- __Returns:__
2211
-
2212
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<UIA_BUTTON|XCUIELEMENT_TYPE_BUTTON>]
2213
-
2214
- --
2215
-
2216
- ##### [find](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/generic.rb#L20) ios
2217
-
2218
- > def find(value)
2219
-
2220
- Find the first element containing value
2221
-
2222
- __Parameters:__
2223
-
2224
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2225
-
2226
- __Returns:__
2227
-
2228
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
2229
-
2230
- --
2231
-
2232
- ##### [finds](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/generic.rb#L27) ios
2233
-
2234
- > def finds(value)
2235
-
2236
- Find all elements containing value
2237
-
2238
- __Parameters:__
2239
-
2240
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2241
-
2242
- __Returns:__
2243
-
2244
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>]
2245
-
2246
- --
2247
-
2248
- ##### [find_exact](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/generic.rb#L34) ios
2249
-
2250
- > def find_exact(value)
2251
-
2252
- Find the first element exactly matching value
2253
-
2254
- __Parameters:__
2255
-
2256
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2257
-
2258
- __Returns:__
2259
-
2260
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
2261
-
2262
- --
2263
-
2264
- ##### [finds_exact](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/generic.rb#L41) ios
2265
-
2266
- > def finds_exact(value)
2267
-
2268
- Find all elements exactly matching value
2269
-
2270
- __Parameters:__
2271
-
2272
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2273
-
2274
- __Returns:__
2275
-
2276
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>]
2277
-
2278
- --
2279
-
2280
- ##### [raise_error_if_no_element](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/generic.rb#L47) ios
2281
-
2282
- > def raise_error_if_no_element(element)
2283
-
2284
-
2285
-
2286
- --
2287
-
2288
- ##### [select_visible_elements](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/generic.rb#L55) ios
2289
-
2290
- > def select_visible_elements(elements)
2291
-
2292
- Return visible elements.
2293
-
2294
- --
2295
-
2296
- ##### [for](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/bridge.rb#L21) ios
2297
-
2298
- > def for(target)
2299
-
2300
-
2301
-
2302
- --
2303
-
2304
- ##### [last_ele](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/helper.rb#L40) ios
2305
-
2306
- > def last_ele(class_name)
2307
-
2308
- Get the last tag that matches class_name
2309
-
2310
- __Parameters:__
2311
-
2312
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the tag to match
2313
-
2314
- __Returns:__
2315
-
2316
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
2317
-
2318
- --
2319
-
2320
- ##### [tag](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/helper.rb#L51) ios
2321
-
2322
- > def tag(class_name)
2323
-
2324
- Returns the first **visible** element matching class_name
2325
-
2326
- __Parameters:__
2327
-
2328
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class_name to search for
2329
-
2330
- __Returns:__
2331
-
2332
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
2333
-
2334
- --
2335
-
2336
- ##### [tags](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/helper.rb#L59) ios
2337
-
2338
- > def tags(class_name)
2339
-
2340
- Returns all visible elements matching class_name
2341
-
2342
- __Parameters:__
2343
-
2344
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class_name to search for
2345
-
2346
- __Returns:__
2347
-
2348
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
2349
-
2350
- --
2351
-
2352
- ##### [tags_include](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/helper.rb#L71) ios
2353
-
2354
- > def tags_include(class_names:, value: nil)
2355
-
2356
- Returns all visible elements matching class_names and value
2357
- This method calls find_element/s and element.value/text many times.
2358
- So, if you set many class_names, this method's performance become worse.
2359
-
2360
- __Parameters:__
2361
-
2362
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array[String]] class_names - the class_names to search for
2363
-
2364
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2365
-
2366
- __Returns:__
2367
-
2368
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array[Element]]
2369
-
2370
- --
2371
-
2372
- ##### [tags_exact](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/helper.rb#L93) ios
2373
-
2374
- > def tags_exact(class_names:, value: nil)
2375
-
2376
- Returns all visible elements matching class_names and value.
2377
- This method calls find_element/s and element.value/text many times.
2378
- So, if you set many class_names, this method's performance become worse.
2379
-
2380
- __Parameters:__
2381
-
2382
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array[String]] class_names - the class_names to search for
2383
-
2384
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2385
-
2386
- __Returns:__
2387
-
2388
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array[Element]]
2389
-
2390
- --
2391
-
2392
- ##### [start_logs_broadcast](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/command.rb#L33) ios
2393
-
2394
- > def start_logs_broadcast(syslog_file = 'syslog.log')
2395
-
2396
- Starts iOS syslog broadcast websocket
2397
-
2398
- __Parameters:__
2399
-
2400
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] syslog_file - A file path to write messages from a syslog WebSocket client
2401
-
2402
- --
2403
-
2404
- ##### [stop_logs_broadcast](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/command.rb#L46) ios
2405
-
2406
- > def stop_logs_broadcast
2407
-
2408
- Stop iOS syslog broadcast websocket
2409
-
2410
- --
2411
-
2412
- ##### [text_field_class](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/textfield.rb#L28) ios
2413
-
2414
- > def text_field_class
2415
-
2416
-
2417
-
2418
- __Returns:__
2419
-
2420
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] Class name for text field
2421
-
2422
- --
2423
-
2424
- ##### [secure_text_field_class](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/textfield.rb#L33) ios
2425
-
2426
- > def secure_text_field_class
2427
-
2428
-
2429
-
2430
- __Returns:__
2431
-
2432
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] Class name for secure text field
2433
-
2434
- --
2435
-
2436
- ##### [textfield](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/textfield.rb#L42) ios
2437
-
2438
- > def textfield(value)
2439
-
2440
- Find the first TextField that contains value or by index.
2441
- Note: Uses XPath
2442
- If int then the TextField at that index is returned.
2443
-
2444
- __Parameters:__
2445
-
2446
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String, Integer] value - the text to match exactly.
2447
-
2448
- __Returns:__
2449
-
2450
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[TextField]
2451
-
2452
- --
2453
-
2454
- ##### [textfields](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/textfield.rb#L61) ios
2455
-
2456
- > def textfields(value = false)
2457
-
2458
- Find all TextFields containing value.
2459
- If value is omitted, all TextFields are returned.
2460
-
2461
- __Parameters:__
2462
-
2463
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2464
-
2465
- __Returns:__
2466
-
2467
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<TextField>]
2468
-
2469
- --
2470
-
2471
- ##### [first_textfield](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/textfield.rb#L69) ios
2472
-
2473
- > def first_textfield
2474
-
2475
- Find the first TextField.
2476
-
2477
- __Returns:__
2478
-
2479
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[TextField]
2480
-
2481
- --
2482
-
2483
- ##### [last_textfield](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/textfield.rb#L75) ios
2484
-
2485
- > def last_textfield
2486
-
2487
- Find the last TextField.
2488
-
2489
- __Returns:__
2490
-
2491
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[TextField]
2492
-
2493
- --
2494
-
2495
- ##### [textfield_exact](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/textfield.rb#L85) ios
2496
-
2497
- > def textfield_exact(value)
2498
-
2499
- Find the first TextField that exactly matches value.
2500
-
2501
- __Parameters:__
2502
-
2503
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly
2504
-
2505
- __Returns:__
2506
-
2507
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[TextField]
2508
-
2509
- --
2510
-
2511
- ##### [textfields_exact](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/textfield.rb#L92) ios
2512
-
2513
- > def textfields_exact(value)
2514
-
2515
- Find all TextFields that exactly match value.
2516
-
2517
- __Parameters:__
2518
-
2519
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly
2520
-
2521
- __Returns:__
2522
-
2523
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<TextField>]
2524
-
2525
- --
2526
-
2527
- ##### [_textfield_visible](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/textfield.rb#L99) ios
2528
-
2529
- > def _textfield_visible
2530
-
2531
- Appium
2532
-
2533
- --
2534
-
2535
- ##### [_textfield_exact_string](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/textfield.rb#L104) ios
2536
-
2537
- > def _textfield_exact_string(value)
2538
-
2539
- Appium
2540
-
2541
- --
2542
-
2543
- ##### [_textfield_contains_string](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/element/textfield.rb#L111) ios
2544
-
2545
- > def _textfield_contains_string(value)
2546
-
2547
- Appium
2548
-
2549
- --
2550
-
2551
- ##### [static_text_class](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/text.rb#L23) ios
2552
-
2553
- > def static_text_class
2554
-
2555
-
2556
-
2557
- __Returns:__
2558
-
2559
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] Class name for text
2560
-
2561
- --
2562
-
2563
- ##### [text](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/text.rb#L31) ios
2564
-
2565
- > def text(value)
2566
-
2567
- Find the first UIAStaticText|XCUIElementTypeStaticText that contains value or by index.
2568
- If int then the UIAStaticText|XCUIElementTypeStaticText at that index is returned.
2569
-
2570
- __Parameters:__
2571
-
2572
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String, Integer] value - the value to find.
2573
-
2574
- __Returns:__
2575
-
2576
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIA_STATIC_TEXT|XCUIELEMENT_TYPE_STATIC_TEXT]
2577
-
2578
- --
2579
-
2580
- ##### [texts](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/text.rb#L41) ios
2581
-
2582
- > def texts(value = false)
2583
-
2584
- Find all UIAStaticTexts|XCUIElementTypeStaticTexts containing value.
2585
- If value is omitted, all UIAStaticTexts|XCUIElementTypeStaticTexts are returned
2586
-
2587
- __Parameters:__
2588
-
2589
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2590
-
2591
- __Returns:__
2592
-
2593
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<UIA_STATIC_TEXT|XCUIELEMENT_TYPE_STATIC_TEXT>]
2594
-
2595
- --
2596
-
2597
- ##### [first_text](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/text.rb#L50) ios
2598
-
2599
- > def first_text
2600
-
2601
- Find the first UIAStaticText|XCUIElementTypeStaticText.
2602
-
2603
- __Returns:__
2604
-
2605
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIA_STATIC_TEXT|XCUIELEMENT_TYPE_STATIC_TEXT]
2606
-
2607
- --
2608
-
2609
- ##### [last_text](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/text.rb#L56) ios
2610
-
2611
- > def last_text
2612
-
2613
- Find the last UIAStaticText|XCUIElementTypeStaticText.
2614
-
2615
- __Returns:__
2616
-
2617
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIA_STATIC_TEXT|XCUIELEMENT_TYPE_STATIC_TEXT]
2618
-
2619
- --
2620
-
2621
- ##### [text_exact](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/text.rb#L63) ios
2622
-
2623
- > def text_exact(value)
2624
-
2625
- Find the first UIAStaticText|XCUIElementTypeStaticText that exactly matches value.
2626
-
2627
- __Parameters:__
2628
-
2629
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly
2630
-
2631
- __Returns:__
2632
-
2633
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIA_STATIC_TEXT|XCUIELEMENT_TYPE_STATIC_TEXT]
2634
-
2635
- --
2636
-
2637
- ##### [texts_exact](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/text.rb#L70) ios
2638
-
2639
- > def texts_exact(value)
2640
-
2641
- Find all UIAStaticTexts|XCUIElementTypeStaticTexts that exactly match value.
2642
-
2643
- __Parameters:__
2644
-
2645
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly
2646
-
2647
- __Returns:__
2648
-
2649
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<UIA_STATIC_TEXT|XCUIELEMENT_TYPE_STATIC_TEXT>]
2650
-
2651
- --
2652
-
2653
- ##### [xcuitest_source](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/command/source.rb#L25) ios
2654
-
2655
- > def xcuitest_source(format: :xml)
2656
-
2657
-
2658
-
2659
- __Parameters:__
2660
-
2661
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String|Symbol] format - :xml or :json. :xml is by default.
2662
-
2663
- ```ruby
2664
- xcuitest_source format: :json
2665
- ```
2666
-
2667
- --
2668
-
2669
- ##### [button_class](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/button.rb#L23) ios
2670
-
2671
- > def button_class
2672
-
2673
-
2674
-
2675
- __Returns:__
2676
-
2677
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] Class name for button
2678
-
2679
- --
2680
-
2681
- ##### [button](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/button.rb#L31) ios
2682
-
2683
- > def button(value)
2684
-
2685
- Find the first UIAButton|XCUIElementTypeButton that contains value or by index.
2686
- If int then the UIAButton|XCUIElementTypeButton at that index is returned.
2687
-
2688
- __Parameters:__
2689
-
2690
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String, Integer] value - the value to exactly match.
2691
-
2692
- __Returns:__
2693
-
2694
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIA_BUTTON|XCUIELEMENT_TYPE_BUTTON]
2695
-
2696
- --
2697
-
2698
- ##### [buttons](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/button.rb#L42) ios
2699
-
2700
- > def buttons(value = false)
2701
-
2702
- Find all UIAButtons|XCUIElementTypeButtons containing value.
2703
- If value is omitted, all UIAButtons|XCUIElementTypeButtons are returned.
2704
-
2705
- __Parameters:__
2706
-
2707
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2708
-
2709
- __Returns:__
2710
-
2711
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<UIA_BUTTON|XCUIELEMENT_TYPE_BUTTON>]
2712
-
2713
- --
2714
-
2715
- ##### [first_button](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/button.rb#L51) ios
2716
-
2717
- > def first_button
2718
-
2719
- Find the first UIAButton|XCUIElementTypeButton.
2720
-
2721
- __Returns:__
2722
-
2723
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIA_BUTTON|XCUIELEMENT_TYPE_BUTTON]
2724
-
2725
- --
2726
-
2727
- ##### [last_button](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/button.rb#L59) ios
2728
-
2729
- > def last_button
2730
-
2731
- TODO: add documentation regarding previous element.
2732
- Previous UIAElement is differ from UIAButton|XCUIElementTypeButton. So, the results are different.
2733
- Find the last UIAButton|XCUIElementTypeButton.
2734
-
2735
- __Returns:__
2736
-
2737
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIA_BUTTON|XCUIELEMENT_TYPE_BUTTON]
2738
-
2739
- --
2740
-
2741
- ##### [button_exact](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/button.rb#L66) ios
2742
-
2743
- > def button_exact(value)
2744
-
2745
- Find the first UIAButton|XCUIElementTypeButton that exactly matches value.
2746
-
2747
- __Parameters:__
2748
-
2749
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly
2750
-
2751
- __Returns:__
2752
-
2753
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[UIA_BUTTON|XCUIELEMENT_TYPE_BUTTON]
2754
-
2755
- --
2756
-
2757
- ##### [buttons_exact](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/button.rb#L73) ios
2758
-
2759
- > def buttons_exact(value)
2760
-
2761
- Find all UIAButtons|XCUIElementTypeButtons that exactly match value.
2762
-
2763
- __Parameters:__
2764
-
2765
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly
2766
-
2767
- __Returns:__
2768
-
2769
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<UIA_BUTTON|XCUIELEMENT_TYPE_BUTTON>]
2770
-
2771
- --
2772
-
2773
- ##### [find](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/generic.rb#L22) ios
2774
-
2775
- > def find(value)
2776
-
2777
- Find the first element containing value
2778
-
2779
- __Parameters:__
2780
-
2781
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2782
-
2783
- __Returns:__
2784
-
2785
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
2786
-
2787
- --
2788
-
2789
- ##### [finds](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/generic.rb#L29) ios
2790
-
2791
- > def finds(value)
2792
-
2793
- Find all elements containing value
2794
-
2795
- __Parameters:__
2796
-
2797
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2798
-
2799
- __Returns:__
2800
-
2801
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>]
2802
-
2803
- --
2804
-
2805
- ##### [find_exact](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/generic.rb#L37) ios
2806
-
2807
- > def find_exact(value)
2808
-
2809
- Find the first element exactly matching value
2810
-
2811
- __Parameters:__
2812
-
2813
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2814
-
2815
- __Returns:__
2816
-
2817
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
2818
-
2819
- --
2820
-
2821
- ##### [finds_exact](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/generic.rb#L44) ios
2822
-
2823
- > def finds_exact(value)
2824
-
2825
- Find all elements exactly matching value
2826
-
2827
- __Parameters:__
2828
-
2829
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2830
-
2831
- __Returns:__
2832
-
2833
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>]
2834
-
2835
- --
2836
-
2837
- ##### [raise_error_if_no_element](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/generic.rb#L51) ios
2838
-
2839
- > def raise_error_if_no_element(element)
2840
-
2841
-
2842
-
2843
- --
2844
-
2845
- ##### [select_visible_elements](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/generic.rb#L59) ios
2846
-
2847
- > def select_visible_elements(elements)
2848
-
2849
- Return visible elements.
2850
-
2851
- --
2852
-
2853
- ##### [swipe](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/command/gestures.rb#L25) ios
2854
-
2855
- > def swipe(direction:, element: nil)
2856
-
2857
-
2858
-
2859
- __Parameters:__
2860
-
2861
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[string] direction - Either 'up', 'down', 'left' or 'right'.
2862
-
2863
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options
2864
-
2865
- --
2866
-
2867
- ##### [scroll](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/command/gestures.rb#L46) ios
2868
-
2869
- > def scroll(direction:, distance: nil, name: nil, element: nil, to_visible: nil, predicate_string: nil)
2870
-
2871
- rubocop:disable Metrics/ParameterLists
2872
-
2873
- __Parameters:__
2874
-
2875
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[string] direction - Either 'up', 'down', 'left' or 'right'.
2876
-
2877
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options
2878
-
2879
- --
2880
-
2881
- ##### [pinch](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/command/gestures.rb#L67) ios
2882
-
2883
- > def pinch(scale:, velocity: 1.0, element: nil)
2884
-
2885
-
2886
-
2887
- __Parameters:__
2888
-
2889
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[scale] scale - X tap coordinate of type float. Mandatory parameter
2890
-
2891
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[float] velocity - Y tap coordinate of type float. Mandatory parameter
2892
-
2893
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options
2894
-
2895
- --
2896
-
2897
- ##### [double_tap](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/command/gestures.rb#L82) ios
2898
-
2899
- > def double_tap(x: nil, y: nil, element: nil)
2900
-
2901
-
2902
-
2903
- __Parameters:__
2904
-
2905
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[float] x - X Screen x tap coordinate of type float. Mandatory parameter only if element is not set
2906
-
2907
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[float] y - Y Screen y tap coordinate of type float. Mandatory parameter only if element is not set
2908
-
2909
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options
2910
-
2911
- --
2912
-
2913
- ##### [touch_and_hold](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/command/gestures.rb#L99) ios
2914
-
2915
- > def touch_and_hold(x: nil, y: nil, element: nil, duration: 1.0)
2916
-
2917
-
2918
-
2919
- __Parameters:__
2920
-
2921
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[float] x - Screen x long tap coordinate of type float. Mandatory parameter only if element is not set
2922
-
2923
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[float] y - Screen y long tap coordinate of type float. Mandatory parameter only if element is not set
2924
-
2925
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Float] duration - The float duration of press action in seconds. Mandatory parameter
2926
-
2927
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options
2928
-
2929
- --
2930
-
2931
- ##### [two_finger_tap](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/command/gestures.rb#L112) ios
2932
-
2933
- > def two_finger_tap(element:)
2934
-
2935
-
2936
-
2937
- __Parameters:__
2938
-
2939
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] element - Element to long tap on.
2940
-
2941
- ```ruby
2942
- two_finger_tap element: find_element(:accessibility_id, "some item")
2943
- ```
2944
-
2945
- --
2946
-
2947
- ##### [one_finger_tap](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/command/gestures.rb#L127) ios
2948
-
2949
- > def one_finger_tap(x:, y:, element: nil)
2950
-
2951
-
2952
-
2953
- __Parameters:__
2954
-
2955
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[float] x - X tap coordinate of type float. Mandatory parameter
2956
-
2957
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[float] y - Y tap coordinate of type float. Mandatory parameter
2958
-
2959
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options
2960
-
2961
- --
2962
-
2963
- ##### [drag_from_to_for_duration](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/command/gestures.rb#L147) ios
2964
-
2965
- > def drag_from_to_for_duration(from_x:, from_y:, to_x:, to_y:, duration: 1.0, element: nil)
2966
-
2967
- rubocop:disable Metrics/ParameterLists
2968
-
2969
- __Parameters:__
2970
-
2971
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[float] duration - Float number of seconds in range [0.5, 60]. How long the tap gesture at starting
2972
- drag point should be before to start dragging. Mandatory parameter
2973
-
2974
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[float] from_x - The x coordinate of starting drag point (type float). Mandatory parameter
2975
-
2976
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[float] from_y - The y coordinate of starting drag point (type float). Mandatory parameter
2977
-
2978
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[float] to_x - The x coordinate of ending drag point (type float). Mandatory parameter
2979
-
2980
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[float] to_y - The y coordinate of ending drag point (type float). Mandatory parameter
2981
-
2982
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options
2983
-
2984
- --
2985
-
2986
- ##### [select_picker_wheel](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/command/gestures.rb#L164) ios
2987
-
2988
- > def select_picker_wheel(element:, order:, offset: nil)
2989
-
2990
- https://github.com/facebook/WebDriverAgent/pull/523
2991
- https://github.com/appium/appium-xcuitest-driver/pull/420
2992
-
2993
- __Parameters:__
2994
-
2995
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] order - The order to move picker to. "next" or "previous".
2996
-
2997
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] element - Element id to perform select picker wheel on.
2998
-
2999
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options
3000
-
3001
- --
3002
-
3003
- ##### [alert](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/command/gestures.rb#L182) ios
3004
-
3005
- > def alert(action:, button_label: nil)
3006
-
3007
-
3008
-
3009
- __Parameters:__
3010
-
3011
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] action - The following actions are supported: accept, dismiss and getButtons. Mandatory parameter
3012
-
3013
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] button_label - The label text of an existing alert button to click on.
3014
- This is an optional parameter and is only valid in combination with accept and dismiss actions.
3015
-
3016
- __Returns:__
3017
-
3018
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[] {} or Selenium::WebDriver::Error::NoSuchAlertError if no action sheet or alert
3019
- or button labels if action is equal to getButtons.
3020
-
3021
- ```ruby
3022
- alert action: "accept"
3023
- alert action: "dismiss"
3024
- ```
3025
-
3026
- --
3027
-
3028
- ##### [text_field_class](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/textfield.rb#L23) ios
3029
-
3030
- > def text_field_class
3031
-
3032
-
3033
-
3034
- __Returns:__
3035
-
3036
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] Class name for text field
3037
-
3038
- --
3039
-
3040
- ##### [secure_text_field_class](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/textfield.rb#L28) ios
3041
-
3042
- > def secure_text_field_class
3043
-
3044
-
3045
-
3046
- __Returns:__
3047
-
3048
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] Class name for secure text field
3049
-
3050
- --
3051
-
3052
- ##### [textfield](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/textfield.rb#L37) ios
3053
-
3054
- > def textfield(value)
3055
-
3056
- Find the first TextField that contains value or by index.
3057
- Note: Uses XPath
3058
- If int then the TextField at that index is returned.
3059
-
3060
- __Parameters:__
3061
-
3062
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String, Integer] value - the text to match exactly.
3063
-
3064
- __Returns:__
3065
-
3066
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[TextField]
3067
-
3068
- --
3069
-
3070
- ##### [textfields](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/textfield.rb#L57) ios
3071
-
3072
- > def textfields(value = false)
3073
-
3074
- Find all TextFields containing value.
3075
- If value is omitted, all TextFields are returned.
3076
-
3077
- __Parameters:__
3078
-
3079
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
3080
-
3081
- __Returns:__
3082
-
3083
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<TextField>]
3084
-
3085
- --
3086
-
3087
- ##### [first_textfield](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/textfield.rb#L66) ios
3088
-
3089
- > def first_textfield
3090
-
3091
- Find the first TextField.
3092
-
3093
- __Returns:__
3094
-
3095
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[TextField]
3096
-
3097
- --
3098
-
3099
- ##### [last_textfield](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/textfield.rb#L72) ios
3100
-
3101
- > def last_textfield
3102
-
3103
- Find the last TextField.
3104
-
3105
- __Returns:__
3106
-
3107
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[TextField]
3108
-
3109
- --
3110
-
3111
- ##### [textfield_exact](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/textfield.rb#L82) ios
3112
-
3113
- > def textfield_exact(value)
3114
-
3115
- Find the first TextField that exactly matches value.
3116
-
3117
- __Parameters:__
3118
-
3119
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly
3120
-
3121
- __Returns:__
3122
-
3123
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[TextField]
3124
-
3125
- --
3126
-
3127
- ##### [textfields_exact](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/element/textfield.rb#L89) ios
3128
-
3129
- > def textfields_exact(value)
3130
-
3131
- Find all TextFields that exactly match value.
3132
-
3133
- __Parameters:__
3134
-
3135
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly
3136
-
3137
- __Returns:__
3138
-
3139
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<TextField>]
3140
-
3141
- --
3142
-
3143
- ##### [set_pasteboard](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/command/pasteboard.rb#L26) ios
3144
-
3145
- > def set_pasteboard(content:, encoding: nil)
3146
-
3147
-
3148
-
3149
- __Parameters:__
3150
-
3151
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[string] content - The content of the pasteboard. The previous content is going to be overridden.
3152
- The parameter is mandatory
3153
-
3154
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options
3155
-
3156
- --
3157
-
3158
- ##### [get_pasteboard](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/command/pasteboard.rb#L38) ios
3159
-
3160
- > def get_pasteboard(encoding: nil)
3161
-
3162
-
3163
-
3164
- __Parameters:__
3165
-
3166
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - a customizable set of options
3167
-
3168
- --
3169
-
3170
- ##### [install_certificate](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/command/certificate.rb#L32) ios
3171
-
3172
- > def install_certificate(cer_file:)
3173
-
3174
- Generates Apple's over-the-air configuration profile for certificate deployment
3175
- based on the given PEM certificate content.
3176
- https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/iPhoneOTAConfiguration/Introduction/Introduction.html
3177
- https://github.com/appium/appium-xcuitest-driver/pull/652
3178
-
3179
- __Parameters:__
3180
-
3181
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[string] cer_file - The content of the certificate file.
3182
-
3183
- --
3184
-
3185
- ##### [xcuitest_get_contexts](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/command/get_context.rb#L28) ios
3186
-
3187
- > def xcuitest_get_contexts
3188
-
3189
- Get contexts
3190
-
3191
- --
3192
-
3193
- ##### [xcuitest_install_app](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/command/multi_app_handler.rb#L35) ios
3194
-
3195
- > def xcuitest_install_app(app:)
3196
-
3197
- Installs given application to the device under test. If the same application is already installed
3198
- then it's going to be installed over it, which allows to test upgrades.
3199
- Be careful while reinstalling the main application under test - make sure you called terminateApp
3200
- for it first, otherwise WebDriverAgent will detect it as a potential application crash.
3201
-
3202
- __Parameters:__
3203
-
3204
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] app - The path to an existing .ipa/.app file on the server file system, zipped .app file
3205
- or an URL pointing to a remote .ipa/.zip file. Mandatory argument.
3206
-
3207
- __Returns:__
3208
-
3209
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[] {}
3210
-
3211
- --
3212
-
3213
- ##### [xcuitest_app_installed?](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/command/multi_app_handler.rb#L48) ios
3214
-
3215
- > def xcuitest_app_installed?(bundle_id:)
3216
-
3217
- Verifies whether the application with given bundle identifier is installed on the device.
3218
-
3219
- __Parameters:__
3220
-
3221
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] bundle_id - The bundle identifier of the application, which is going to be verified.
3222
-
3223
- __Returns:__
3224
-
3225
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[boolean]
3226
-
3227
- --
3228
-
3229
- ##### [xcuitest_remove_app](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/command/multi_app_handler.rb#L62) ios
3230
-
3231
- > def xcuitest_remove_app(bundle_id:)
3232
-
3233
- Uninstalls an existing application from the device under test. This endpoint does not verify
3234
- whether the application is already installed or not before uninstalling it.
3235
-
3236
- __Parameters:__
3237
-
3238
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] bundle_id - The bundle identifier of the application, which is going to be uninstalled.
3239
-
3240
- __Returns:__
3241
-
3242
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[] {}
3243
-
3244
- --
3245
-
3246
- ##### [xcuitest_launch_app](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/command/multi_app_handler.rb#L76) ios
3247
-
3248
- > def xcuitest_launch_app(bundle_id:)
3249
-
3250
- Executes an existing application on the device. If the application is already running then
3251
- it will be brought to the foreground.
3252
-
3253
- __Parameters:__
3254
-
3255
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] bundle_id - The bundle identifier of the application, which is going to be executed.
3256
-
3257
- __Returns:__
3258
-
3259
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[] {}
3260
-
3261
- --
3262
-
3263
- ##### [xcuitest_terminate_app](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/command/multi_app_handler.rb#L91) ios
3264
-
3265
- > def xcuitest_terminate_app(bundle_id:)
3266
-
3267
- Terminates an existing application on the device. If the application is not running then
3268
- the returned result will be false, otherwise true.
3269
-
3270
- __Parameters:__
3271
-
3272
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] bundle_id - The bundle identifier of the application, which is going to be terminated.
3273
-
3274
- __Returns:__
3275
-
3276
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[] {}
3277
-
3278
- --
3279
-
3280
- ##### [xcuitest_query_app_status](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/command/multi_app_handler.rb#L112) ios
3281
-
3282
- > def xcuitest_query_app_status(bundle_id:)
3283
-
3284
- Get the status of an existing application on the device.
3285
- State:
3286
- 0: The current application state cannot be determined/is unknown
3287
- 1: The application is not running
3288
- 2: The application is running in the background and is suspended
3289
- 3: The application is running in the background and is not suspended
3290
- 4: The application is running in the foreground
3291
-
3292
- For more details: https://developer.apple.com/documentation/xctest/xcuiapplicationstate
3293
-
3294
- __Parameters:__
3295
-
3296
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] bundle_id - A target app's bundle id
3297
-
3298
- __Returns:__
3299
-
3300
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[0|1|2|3|4] A number of the state
3301
-
3302
- --
3303
-
3304
- ##### [xcuitest_activate_app](https://github.com/appium/ruby_lib/blob/50cf980b570acd7d2d95ea64d1d1b0225f96c73b/lib/appium_lib/ios/xcuitest/command/multi_app_handler.rb#L127) ios
3305
-
3306
- > def xcuitest_activate_app(bundle_id:)
3307
-
3308
- Activates an existing application on the device under test and moves it to the foreground.
3309
- The application should be already running in order to activate it.
3310
- The call is ignored if the application is already in foreground.
3311
-
3312
- __Parameters:__
3313
-
3314
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] bundle_id - The bundle identifier of the application, which is going to be brought to the foreground.
3315
-
3316
- __Returns:__
3317
-
3318
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[] {}
3319
-
3320
- --
3321
-