appium_lib 15.0.0 → 15.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/docs/android_docs.md DELETED
@@ -1,2590 +0,0 @@
1
- ##### [load_settings](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/appium.rb#L58) common
2
-
3
- > def load_settings(opts = {})
4
-
5
- Load arbitrary text ([toml format](https://github.com/toml-lang/toml))
6
- The toml is parsed by https://github.com/fbernier/tomlrb .
7
-
8
- ```
9
- [caps]
10
- app = "path/to/app"
11
-
12
- [appium_lib]
13
- port = 8080
14
- ```
15
-
16
- :app is expanded
17
- :require is expanded
18
- all keys are converted to symbols
19
-
20
- __Parameters:__
21
-
22
-      [Hash] opts - file: '/path/to/appium.txt', verbose: true
23
-
24
- __Returns:__
25
-
26
-      [hash] the symbolized hash with updated :app and :require keys
27
-
28
- --
29
-
30
- ##### [load_appium_txt](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/appium.rb#L106) common
31
-
32
- > def load_settings(opts = {})
33
-
34
- Load arbitrary text ([toml format](https://github.com/toml-lang/toml))
35
- The toml is parsed by https://github.com/fbernier/tomlrb .
36
-
37
- ```
38
- [caps]
39
- app = "path/to/app"
40
-
41
- [appium_lib]
42
- port = 8080
43
- ```
44
-
45
- :app is expanded
46
- :require is expanded
47
- all keys are converted to symbols
48
-
49
- __Parameters:__
50
-
51
-      [Hash] opts - file: '/path/to/appium.txt', verbose: true
52
-
53
- __Returns:__
54
-
55
-      [hash] the symbolized hash with updated :app and :require keys
56
-
57
- --
58
-
59
- ##### [expand_required_files](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/appium.rb#L111) common
60
-
61
- > def expand_required_files(base_dir, file_paths)
62
-
63
-
64
-
65
- __Parameters:__
66
-
67
-      [String] base_dir - parent directory of loaded appium.txt (toml)
68
-
69
-      [String] file_paths -
70
-
71
- __Returns:__
72
-
73
-      [Array] list of require files as an array, nil if require doesn't exist
74
-
75
- --
76
-
77
- ##### [promote_singleton_appium_methods](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/appium.rb#L153) common
78
-
79
- > def promote_singleton_appium_methods(modules, driver = $driver)
80
-
81
- This method is intended to work with page objects that share
82
- a common module. For example, Page::HomePage, Page::SignIn
83
- those could be promoted on with Appium.promote_singleton_appium_methods Page
84
-
85
- If you are promoting on an individual class then you should use
86
- Appium.promote_appium_methods instead. The singleton method is intended
87
- only for the shared module use case.
88
-
89
- if modules is a module instead of an array, then the constants of
90
- that module are promoted on.
91
- otherwise, the array of modules will be used as the promotion target.
92
-
93
- __Parameters:__
94
-
95
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Module>] modules - An array of modules
96
-
97
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Driver] driver - A driver to extend for
98
-
99
- --
100
-
101
- ##### [promote_appium_methods](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/appium.rb#L207) common
102
-
103
- > def promote_appium_methods(class_array, driver = $driver)
104
-
105
- Promote appium methods to class instance methods
106
-
107
- To promote methods to all classes:
108
-
109
- It's better to promote on specific classes instead of Object
110
-
111
- __Parameters:__
112
-
113
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Class>] class_array - An array of classes
114
-
115
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Driver] driver - A driver to extend for
116
-
117
- --
118
-
119
- ##### [global_webdriver_http_sleep](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L49) common
120
-
121
- > def global_webdriver_http_sleep
122
-
123
- The amount to sleep in seconds before every webdriver http call.
124
-
125
- --
126
-
127
- ##### [global_webdriver_http_sleep=](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L49) common
128
-
129
- > def global_webdriver_http_sleep=(value)
130
-
131
- The amount to sleep in seconds before every webdriver http call.
132
-
133
- --
134
-
135
- ##### [sauce](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L52) common
136
-
137
- > def sauce
138
-
139
- SauceLab's settings
140
-
141
- --
142
-
143
- ##### [sauce_username](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L55) common
144
-
145
- > def sauce_username
146
-
147
- Username for use on Sauce Labs. Set `false` to disable Sauce, even when SAUCE_USERNAME is in ENV.
148
- same as @sauce.username
149
-
150
- --
151
-
152
- ##### [sauce_access_key](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L58) common
153
-
154
- > def sauce_access_key
155
-
156
- Access Key for use on Sauce Labs. Set `false` to disable Sauce, even when SAUCE_ACCESS_KEY is in ENV.
157
- same as @sauce.access_key
158
-
159
- --
160
-
161
- ##### [sauce_endpoint](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L61) common
162
-
163
- > def sauce_endpoint
164
-
165
- Override the Sauce Appium endpoint to allow e.g. TestObject tests
166
- same as @sauce.endpoint
167
-
168
- --
169
-
170
- ##### [caps](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L65) common
171
-
172
- > def caps
173
-
174
- from Core
175
- read http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Driver
176
-
177
- --
178
-
179
- ##### [custom_url](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L66) common
180
-
181
- > def custom_url
182
-
183
- Returns the value of attribute custom_url.
184
-
185
- --
186
-
187
- ##### [default_wait](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L67) common
188
-
189
- > def default_wait
190
-
191
- Returns the value of attribute default_wait.
192
-
193
- --
194
-
195
- ##### [appium_port](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L68) common
196
-
197
- > def appium_port
198
-
199
- Returns the value of attribute appium_port.
200
-
201
- --
202
-
203
- ##### [appium_device](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L69) common
204
-
205
- > def appium_device
206
-
207
- Returns the value of attribute appium_device.
208
-
209
- --
210
-
211
- ##### [automation_name](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L70) common
212
-
213
- > def automation_name
214
-
215
- Returns the value of attribute automation_name.
216
-
217
- --
218
-
219
- ##### [listener](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L71) common
220
-
221
- > def listener
222
-
223
- Returns the value of attribute listener.
224
-
225
- --
226
-
227
- ##### [http_client](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L72) common
228
-
229
- > def http_client
230
-
231
- Returns the value of attribute http_client.
232
-
233
- --
234
-
235
- ##### [appium_wait_timeout](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L73) common
236
-
237
- > def appium_wait_timeout
238
-
239
- Returns the value of attribute appium_wait_timeout.
240
-
241
- --
242
-
243
- ##### [appium_wait_interval](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L74) common
244
-
245
- > def appium_wait_interval
246
-
247
- Returns the value of attribute appium_wait_interval.
248
-
249
- --
250
-
251
- ##### [appium_server_status](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L77) common
252
-
253
- > def appium_server_status
254
-
255
- Appium's server version
256
-
257
- --
258
-
259
- ##### [appium_debug](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L79) common
260
-
261
- > def appium_debug
262
-
263
- Boolean debug mode for the Appium Ruby bindings
264
-
265
- --
266
-
267
- ##### [driver](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L82) common
268
-
269
- > def driver
270
-
271
- Returns the driver
272
-
273
- __Returns:__
274
-
275
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Driver] the driver
276
-
277
- --
278
-
279
- ##### [core](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L84) common
280
-
281
- > def core
282
-
283
- Instance of Appium::Core::Driver
284
-
285
- --
286
-
287
- ##### [initialize](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L153) common
288
-
289
- > def initialize(opts = {}, global_driver = false)
290
-
291
- Creates a new driver. The driver is defined as global scope by default.
292
- We can avoid defining global driver.
293
-
294
- __Parameters:__
295
-
296
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Object] opts - A hash containing various options.
297
-
298
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Bool] global_driver - A bool require global driver before initialize.
299
-
300
- __Returns:__
301
-
302
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Driver]
303
-
304
- --
305
-
306
- ##### [driver_attributes](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L273) common
307
-
308
- > def driver_attributes
309
-
310
- Returns a hash of the driver attributes
311
-
312
- --
313
-
314
- ##### [device_is_android?](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L291) common
315
-
316
- > def device_is_android?
317
-
318
-
319
-
320
- __Returns:__
321
-
322
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Boolean]
323
-
324
- --
325
-
326
- ##### [device_is_ios?](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L295) common
327
-
328
- > def device_is_ios?
329
-
330
-
331
-
332
- __Returns:__
333
-
334
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Boolean]
335
-
336
- --
337
-
338
- ##### [device_is_windows?](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L299) common
339
-
340
- > def device_is_windows?
341
-
342
-
343
-
344
- __Returns:__
345
-
346
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Boolean]
347
-
348
- --
349
-
350
- ##### [automation_name_is_uiautomator2?](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L305) common
351
-
352
- > def automation_name_is_uiautomator2?
353
-
354
- Return true if automationName is 'uiautomator2'
355
-
356
- __Returns:__
357
-
358
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Boolean]
359
-
360
- --
361
-
362
- ##### [automation_name_is_espresso?](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L311) common
363
-
364
- > def automation_name_is_espresso?
365
-
366
- Return true if automationName is 'Espresso'
367
-
368
- __Returns:__
369
-
370
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Boolean]
371
-
372
- --
373
-
374
- ##### [automation_name_is_xcuitest?](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L317) common
375
-
376
- > def automation_name_is_xcuitest?
377
-
378
- Return true if automationName is 'XCUITest'
379
-
380
- __Returns:__
381
-
382
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Boolean]
383
-
384
- --
385
-
386
- ##### [action](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L331) common
387
-
388
- > def action
389
-
390
- An entry point to chain W3C actions
391
- Read https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Base/Bridge/W3C#action-instance_method
392
-
393
- __Returns:__
394
-
395
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Selenium::WebDriver::PointerActions]
396
-
397
- --
398
-
399
- ##### [appium_server_version](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L346) common
400
-
401
- > def appium_server_version
402
-
403
- Returns the server's version info
404
-
405
- __Returns:__
406
-
407
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash]
408
-
409
- --
410
-
411
- ##### [remote_status](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L354) common
412
-
413
- > def appium_server_version
414
-
415
- Returns the server's version info
416
-
417
- __Returns:__
418
-
419
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash]
420
-
421
- --
422
-
423
- ##### [platform_version](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L358) common
424
-
425
- > def platform_version
426
-
427
- Return the platform version as an array of integers
428
-
429
- __Returns:__
430
-
431
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Integer>]
432
-
433
- --
434
-
435
- ##### [appium_client_version](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L374) common
436
-
437
- > def appium_client_version
438
-
439
- Returns the client's version info
440
-
441
- __Returns:__
442
-
443
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash]
444
-
445
- --
446
-
447
- ##### [absolute_app_path](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L386) common
448
-
449
- > def absolute_app_path(opts)
450
-
451
- [Deprecated] Converts app_path to an absolute path.
452
-
453
- opts is the full options hash (caps and appium_lib). If server_url is set
454
- then the app path is used as is.
455
-
456
- if app isn't set then an error is raised.
457
-
458
- __Returns:__
459
-
460
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] APP_PATH as an absolute path
461
-
462
- --
463
-
464
- ##### [server_url](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L411) common
465
-
466
- > def server_url
467
-
468
- Get the server url
469
-
470
- __Returns:__
471
-
472
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] the server url
473
-
474
- --
475
-
476
- ##### [restart](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L420) common
477
-
478
- > def restart
479
-
480
- Restarts the driver
481
-
482
- __Returns:__
483
-
484
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Driver] the driver
485
-
486
- --
487
-
488
- ##### [screenshot](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L433) common
489
-
490
- > def screenshot(png_save_path)
491
-
492
- Takes a png screenshot and saves to the target path.
493
-
494
- __Parameters:__
495
-
496
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] png_save_path - the full path to save the png
497
-
498
- __Returns:__
499
-
500
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[File]
501
-
502
- --
503
-
504
- ##### [element_screenshot](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L447) common
505
-
506
- > def element_screenshot(element, png_save_path)
507
-
508
- Takes a png screenshot of particular element's area
509
-
510
- __Parameters:__
511
-
512
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] element - Element take a screenshot
513
-
514
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] png_save_path - the full path to save the png
515
-
516
- __Returns:__
517
-
518
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[File]
519
-
520
- --
521
-
522
- ##### [driver_quit](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L454) common
523
-
524
- > def driver_quit
525
-
526
- Quits the driver
527
-
528
- __Returns:__
529
-
530
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void]
531
-
532
- --
533
-
534
- ##### [quit_driver](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L460) common
535
-
536
- > def driver_quit
537
-
538
- Quits the driver
539
-
540
- __Returns:__
541
-
542
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void]
543
-
544
- --
545
-
546
- ##### [window_size](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L471) common
547
-
548
- > def window_size
549
-
550
- Get the device window's size.
551
-
552
- __Returns:__
553
-
554
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Selenium::WebDriver::Dimension]
555
-
556
- --
557
-
558
- ##### [window_rect](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L486) common
559
-
560
- > def window_rect
561
-
562
- Get the device window's rect.
563
-
564
- __Returns:__
565
-
566
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Selenium::WebDriver::Rectangle]
567
-
568
- --
569
-
570
- ##### [start_driver](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L519) common
571
-
572
- > def start_driver(http_client_ops = { http_client: ::Appium::Http::Default.new, open_timeout: 999_999, read_timeout: 999_999 })
573
-
574
- Creates a new global driver and quits the old one if it exists.
575
- You can customise http_client as the following
576
-
577
- Read http://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Device to understand more what the driver
578
- can call instance methods.
579
-
580
- __Parameters:__
581
-
582
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] http_client_ops - a customizable set of options
583
-
584
- __Returns:__
585
-
586
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Selenium::WebDriver] the new global driver
587
-
588
- --
589
-
590
- ##### [set_implicit_wait](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L546) common
591
-
592
- > def set_implicit_wait(wait)
593
-
594
- To ignore error for Espresso Driver
595
-
596
- --
597
-
598
- ##### [no_wait](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L557) common
599
-
600
- > def no_wait
601
-
602
- Set implicit wait to zero.
603
-
604
- --
605
-
606
- ##### [set_wait](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L571) common
607
-
608
- > def set_wait(timeout = nil)
609
-
610
- Set implicit wait. Default to @default_wait.
611
-
612
- __Parameters:__
613
-
614
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Integer] timeout - the timeout in seconds
615
-
616
- __Returns:__
617
-
618
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void]
619
-
620
- --
621
-
622
- ##### [exists](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L588) common
623
-
624
- > def exists(pre_check = 0, post_check = @default_wait)
625
-
626
- Returns existence of element.
627
-
628
- Example:
629
-
630
- exists { button('sign in') } ? puts('true') : puts('false')
631
-
632
- __Parameters:__
633
-
634
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Integer] pre_check - The amount in seconds to set the
635
- wait to before checking existence
636
-
637
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Integer] post_check - The amount in seconds to set the
638
- wait to after checking existence
639
-
640
- __Returns:__
641
-
642
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Boolean]
643
-
644
- --
645
-
646
- ##### [execute_script](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L612) common
647
-
648
- > def execute_script(script, *args)
649
-
650
- The same as @driver.execute_script
651
-
652
- __Parameters:__
653
-
654
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] script - The script to execute
655
-
656
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[*args] args - The args to pass to the script
657
-
658
- __Returns:__
659
-
660
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Object]
661
-
662
- --
663
-
664
- ##### [execute_async_script](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L620) common
665
-
666
- > def execute_async_script(script, *args)
667
-
668
- Wrap calling selenium webdrier APIs via ruby_core
669
-
670
- Get the window handles of open browser windows
671
-
672
- --
673
-
674
- ##### [execute_driver](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L652) common
675
-
676
- > def execute_driver(script: '', type: 'webdriverio', timeout_ms: nil)
677
-
678
- Run a set of script against the current session, allowing execution of many commands in one Appium request.
679
- Supports {https://webdriver.io/docs/api.html WebdriverIO} API so far.
680
- Please read {http://appium.io/docs/en/commands/session/execute-driver command API} for more details
681
- about acceptable scripts and the output.
682
-
683
- __Parameters:__
684
-
685
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] script - The string consisting of the script itself
686
-
687
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] type - The name of the script type.
688
- Defaults to 'webdriverio'. Depends on server implementation which type is supported.
689
-
690
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Integer] timeout_ms - The number of `ms` Appium should wait for the script to finish
691
- before killing it due to timeout.
692
-
693
- __Returns:__
694
-
695
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Appium::Core::Base::Device::ExecuteDriver::Result] The script result parsed by
696
- Appium::Core::Base::Device::ExecuteDriver::Result.
697
-
698
- --
699
-
700
- ##### [window_handles](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L656) common
701
-
702
- > def window_handles
703
-
704
-
705
-
706
- --
707
-
708
- ##### [window_handle](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L661) common
709
-
710
- > def window_handle
711
-
712
- Get the current window handle
713
-
714
- --
715
-
716
- ##### [navigate](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L665) common
717
-
718
- > def navigate
719
-
720
-
721
-
722
- --
723
-
724
- ##### [manage](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L669) common
725
-
726
- > def manage
727
-
728
-
729
-
730
- --
731
-
732
- ##### [get](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L673) common
733
-
734
- > def get(url)
735
-
736
-
737
-
738
- --
739
-
740
- ##### [current_url](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L677) common
741
-
742
- > def current_url
743
-
744
-
745
-
746
- --
747
-
748
- ##### [title](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L681) common
749
-
750
- > def title
751
-
752
-
753
-
754
- --
755
-
756
- ##### [switch_to](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L687) common
757
-
758
- > def switch_to
759
-
760
-
761
-
762
- __Returns:__
763
-
764
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[TargetLocator]
765
-
766
- --
767
-
768
- ##### [find_elements](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L714) common
769
-
770
- > def find_elements(*args)
771
-
772
- Calls @driver.find_elements_with_appium
773
-
774
- If you call `Appium.promote_appium_methods`, you can call `find_elements` directly.
775
-
776
- If you call `Appium.promote_appium_methods`, you can call `find_elements` directly.
777
-
778
- __Parameters:__
779
-
780
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[*args] args - The args to use
781
-
782
- __Returns:__
783
-
784
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>] Array is empty when no elements are found.
785
-
786
- --
787
-
788
- ##### [find_element](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L730) common
789
-
790
- > def find_element(*args)
791
-
792
- Calls @driver.find_element
793
-
794
- If you call `Appium.promote_appium_methods`, you can call `find_element` directly.
795
-
796
- __Parameters:__
797
-
798
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[*args] args - The args to use
799
-
800
- __Returns:__
801
-
802
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
803
-
804
- --
805
-
806
- ##### [find_element_by_image](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L745) common
807
-
808
- > def find_element_by_image(png_img_path)
809
-
810
- Return ImageElement if current view has a partial image
811
-
812
- __Parameters:__
813
-
814
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] png_img_path - A path to a partial image you'd like to find
815
-
816
- __Returns:__
817
-
818
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[::Appium::Core::ImageElement]
819
-
820
- --
821
-
822
- ##### [find_elements_by_image](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L760) common
823
-
824
- > def find_elements_by_image(png_img_paths)
825
-
826
- Return ImageElement if current view has partial images
827
-
828
- __Parameters:__
829
-
830
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[String]] png_img_paths - Paths to a partial image you'd like to find
831
-
832
- __Returns:__
833
-
834
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[::Appium::Core::ImageElement]]
835
-
836
- --
837
-
838
- ##### [set_location](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L773) common
839
-
840
- > def set_location(opts = {})
841
-
842
- Calls @driver.set_location
843
-
844
- __Parameters:__
845
-
846
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] opts - consisting of:
847
-
848
- __Returns:__
849
-
850
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Selenium::WebDriver::Location] the location constructed by the selenium webdriver
851
-
852
- --
853
-
854
- ##### [log_event](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L796) common
855
-
856
- > def log_event(vendor:, event:)
857
-
858
- Logs a custom event. The event is available via {::Appium::Core::Events#get}.
859
-
860
- __Parameters:__
861
-
862
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] vendor - The vendor prefix for the event
863
-
864
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] event - The name of event
865
-
866
- __Returns:__
867
-
868
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[nil]
869
-
870
- --
871
-
872
- ##### [log_event=](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L800) common
873
-
874
- > def log_event=(log_event)
875
-
876
-
877
-
878
- --
879
-
880
- ##### [log_events](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L819) common
881
-
882
- > def log_events(type = nil)
883
-
884
- Returns events with filtering with 'type'. Defaults to all available events.
885
-
886
- __Parameters:__
887
-
888
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] type - The type of events to get
889
-
890
- __Returns:__
891
-
892
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash]
893
-
894
- --
895
-
896
- ##### [x](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/driver.rb#L826) common
897
-
898
- > def x
899
-
900
- Quit the driver and Pry.
901
- quit and exit are reserved by Pry.
902
-
903
- __Returns:__
904
-
905
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void]
906
-
907
- --
908
-
909
- ##### [username](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/sauce_labs.rb#L18) common
910
-
911
- > def username
912
-
913
- Username for use on Sauce Labs. Set `false` to disable Sauce, even when SAUCE_USERNAME is in ENV.
914
-
915
- --
916
-
917
- ##### [access_key](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/sauce_labs.rb#L20) common
918
-
919
- > def access_key
920
-
921
- Access Key for use on Sauce Labs. Set `false` to disable Sauce, even when SAUCE_ACCESS_KEY is in ENV.
922
-
923
- --
924
-
925
- ##### [endpoint](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/sauce_labs.rb#L22) common
926
-
927
- > def endpoint
928
-
929
- Override the Sauce Appium endpoint to allow e.g. TestObject tests. Default is 'ondemand.saucelabs.com:443/wd/hub'.
930
-
931
- --
932
-
933
- ##### [initialize](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/sauce_labs.rb#L47) common
934
-
935
- > def initialize(appium_lib_opts)
936
-
937
- Create a SauceLabs instance to manage sauce labs related attributes.
938
-
939
- __Parameters:__
940
-
941
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] appium_lib_opts - Appium library parameter
942
-
943
- __Returns:__
944
-
945
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Appium::SauceLabs]
946
-
947
- --
948
-
949
- ##### [sauce_server_url?](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/sauce_labs.rb#L67) common
950
-
951
- > def sauce_server_url?
952
-
953
- Return true if an instance of Appium::SauceLabs has sauce_username and sauce_access_key.
954
-
955
- __Returns:__
956
-
957
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Boolean]
958
-
959
- --
960
-
961
- ##### [server_url](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/sauce_labs.rb#L80) common
962
-
963
- > def server_url
964
-
965
- Return a particular server url to access to. Default is the local address.
966
-
967
- __Returns:__
968
-
969
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String]
970
-
971
- --
972
-
973
- ##### [get_log](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/log.rb#L25) common
974
-
975
- > def get_log(type)
976
-
977
-
978
-
979
- __Parameters:__
980
-
981
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String|Hash] type - You can get particular type's logs.
982
-
983
- __Returns:__
984
-
985
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[Selenium::WebDriver::LogEntry]] A list of logs data.
986
-
987
- --
988
-
989
- ##### [get_available_log_types](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/log.rb#L37) common
990
-
991
- > def get_available_log_types
992
-
993
- Get a list of available log types
994
-
995
- __Returns:__
996
-
997
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[[String]] A list of available log types.
998
-
999
- --
1000
-
1001
- ##### [wait_true](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/wait.rb#L44) common
1002
-
1003
- > def wait_true(opts = {})
1004
-
1005
- Check every interval seconds to see if yield returns a truthy value.
1006
- Note this isn't a strict boolean true, any truthy value is accepted.
1007
- false and nil are considered failures.
1008
- Give up after timeout seconds.
1009
-
1010
- Wait code from the selenium Ruby gem
1011
- https://github.com/SeleniumHQ/selenium/blob/cf501dda3f0ed12233de51ce8170c0e8090f0c20/rb/lib/selenium/webdriver/common/wait.rb
1012
-
1013
- If only a number is provided then it's treated as the timeout value.
1014
-
1015
- __Parameters:__
1016
-
1017
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash|Numeric] opts - Options. If the value is _Numeric_, the value is set as `{ timeout: value }`
1018
-
1019
- --
1020
-
1021
- ##### [wait](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/wait.rb#L73) common
1022
-
1023
- > def wait(opts = {})
1024
-
1025
- Check every interval seconds to see if yield doesn't raise an exception.
1026
- Give up after timeout seconds.
1027
-
1028
- Wait code from the selenium Ruby gem
1029
- https://github.com/SeleniumHQ/selenium/blob/cf501dda3f0ed12233de51ce8170c0e8090f0c20/rb/lib/selenium/webdriver/common/wait.rb
1030
-
1031
- If only a number is provided then it's treated as the timeout value.
1032
-
1033
- __Parameters:__
1034
-
1035
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash|Numeric] opts - Options. If the value is _Numeric_, the value is set as `{ timeout: value }`
1036
-
1037
- --
1038
-
1039
- ##### [ignore](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L30) common
1040
-
1041
- > def ignore
1042
-
1043
- Return yield and ignore any exceptions.
1044
-
1045
- --
1046
-
1047
- ##### [back](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L38) common
1048
-
1049
- > def back
1050
-
1051
- Navigate back.
1052
-
1053
- __Returns:__
1054
-
1055
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void]
1056
-
1057
- --
1058
-
1059
- ##### [session_id](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L49) common
1060
-
1061
- > def session_id
1062
-
1063
- For Sauce Labs reporting. Returns the current session id.
1064
-
1065
- __Returns:__
1066
-
1067
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String]
1068
-
1069
- --
1070
-
1071
- ##### [xpath](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L57) common
1072
-
1073
- > def xpath(xpath_str)
1074
-
1075
- Returns the first element that matches the provided xpath.
1076
-
1077
- __Parameters:__
1078
-
1079
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] xpath_str - the XPath string
1080
-
1081
- __Returns:__
1082
-
1083
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1084
-
1085
- --
1086
-
1087
- ##### [xpaths](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L65) common
1088
-
1089
- > def xpaths(xpath_str)
1090
-
1091
- Returns all elements that match the provided xpath.
1092
-
1093
- __Parameters:__
1094
-
1095
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] xpath_str - the XPath string
1096
-
1097
- __Returns:__
1098
-
1099
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>]
1100
-
1101
- --
1102
-
1103
- ##### [result](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L75) common
1104
-
1105
- > def result
1106
-
1107
- Returns the value of attribute result.
1108
-
1109
- --
1110
-
1111
- ##### [initialize](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L77) common
1112
-
1113
- > def initialize(platform)
1114
-
1115
- rubocop:disable Lint/MissingSuper
1116
-
1117
- __Returns:__
1118
-
1119
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[CountElements] a new instance of CountElements
1120
-
1121
- --
1122
-
1123
- ##### [reset](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L82) common
1124
-
1125
- > def reset
1126
-
1127
-
1128
-
1129
- --
1130
-
1131
- ##### [start_element](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L87) common
1132
-
1133
- > def start_element(name, attrs = [])
1134
-
1135
- http://nokogiri.org/Nokogiri/XML/SAX/Document.html
1136
-
1137
- --
1138
-
1139
- ##### [formatted_result](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L98) common
1140
-
1141
- > def formatted_result
1142
-
1143
-
1144
-
1145
- --
1146
-
1147
- ##### [get_page_class](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L116) common
1148
-
1149
- > def get_page_class
1150
-
1151
- Returns a string of class counts of visible elements.
1152
-
1153
- __Returns:__
1154
-
1155
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String]
1156
-
1157
- --
1158
-
1159
- ##### [page_class](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L141) common
1160
-
1161
- > def page_class
1162
-
1163
- Count all classes on screen and print to stdout.
1164
- Useful for appium_console.
1165
-
1166
- __Returns:__
1167
-
1168
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[nil]
1169
-
1170
- --
1171
-
1172
- ##### [source](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L148) common
1173
-
1174
- > def source
1175
-
1176
- Prints xml of the current page
1177
-
1178
- __Returns:__
1179
-
1180
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void]
1181
-
1182
- --
1183
-
1184
- ##### [get_source](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L155) common
1185
-
1186
- > def get_source
1187
-
1188
- Returns XML string for the current page
1189
- Same as driver.page_source
1190
-
1191
- __Returns:__
1192
-
1193
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String]
1194
-
1195
- --
1196
-
1197
- ##### [px_to_window_rel](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L165) common
1198
-
1199
- > def px_to_window_rel(opts = {}, driver = $driver)
1200
-
1201
- Converts pixel values to window relative values
1202
-
1203
- --
1204
-
1205
- ##### [xml_keys](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L184) common
1206
-
1207
- > def xml_keys(target)
1208
-
1209
- Search strings.xml's values for target.
1210
-
1211
- __Parameters:__
1212
-
1213
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] target - the target to search for in strings.xml values
1214
-
1215
- __Returns:__
1216
-
1217
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array]
1218
-
1219
- --
1220
-
1221
- ##### [xml_values](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L192) common
1222
-
1223
- > def xml_values(target)
1224
-
1225
- Search strings.xml's keys for target.
1226
-
1227
- __Parameters:__
1228
-
1229
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] target - the target to search for in strings.xml keys
1230
-
1231
- __Returns:__
1232
-
1233
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array]
1234
-
1235
- --
1236
-
1237
- ##### [resolve_id](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L200) common
1238
-
1239
- > def resolve_id(id)
1240
-
1241
- Resolve id in strings.xml and return the value.
1242
-
1243
- __Parameters:__
1244
-
1245
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] id - the id to resolve
1246
-
1247
- __Returns:__
1248
-
1249
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String]
1250
-
1251
- --
1252
-
1253
- ##### [filter](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L207) common
1254
-
1255
- > def filter
1256
-
1257
- Returns the value of attribute filter.
1258
-
1259
- --
1260
-
1261
- ##### [filter=](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L210) common
1262
-
1263
- > def filter=(value)
1264
-
1265
- convert to string to support symbols
1266
-
1267
- --
1268
-
1269
- ##### [initialize](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L217) common
1270
-
1271
- > def initialize
1272
-
1273
- rubocop:disable Lint/MissingSuper
1274
-
1275
- __Returns:__
1276
-
1277
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[HTMLElements] a new instance of HTMLElements
1278
-
1279
- --
1280
-
1281
- ##### [reset](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L222) common
1282
-
1283
- > def reset
1284
-
1285
-
1286
-
1287
- --
1288
-
1289
- ##### [result](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L228) common
1290
-
1291
- > def result
1292
-
1293
-
1294
-
1295
- --
1296
-
1297
- ##### [start_element](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L242) common
1298
-
1299
- > def start_element(name, attrs = [])
1300
-
1301
-
1302
-
1303
- --
1304
-
1305
- ##### [end_element](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L252) common
1306
-
1307
- > def end_element(name)
1308
-
1309
-
1310
-
1311
- --
1312
-
1313
- ##### [characters](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/helper.rb#L259) common
1314
-
1315
- > def characters(chars)
1316
-
1317
-
1318
-
1319
- --
1320
-
1321
- ##### [initialize](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/command/ws_logcat.rb#L19) common
1322
-
1323
- > def initialize(url:, output_file: 'logcat.log')
1324
-
1325
-
1326
-
1327
- __Returns:__
1328
-
1329
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[WsLogcat] a new instance of WsLogcat
1330
-
1331
- --
1332
-
1333
- ##### [handle_message_data](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/common/command/ws_logcat.rb#L24) common
1334
-
1335
- > def handle_message_data(data)
1336
-
1337
-
1338
-
1339
- --
1340
-
1341
- ##### [for](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/android.rb#L33) android
1342
-
1343
- > def for(target)
1344
-
1345
-
1346
-
1347
- --
1348
-
1349
- ##### [text](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/text.rb#L25) android
1350
-
1351
- > def text(value)
1352
-
1353
- Find the first TextView that contains value or by index.
1354
- If int then the TextView at that index is returned.
1355
-
1356
- __Parameters:__
1357
-
1358
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String, Integer] value - the value to find.
1359
-
1360
- __Returns:__
1361
-
1362
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[TextView]
1363
-
1364
- --
1365
-
1366
- ##### [texts](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/text.rb#L35) android
1367
-
1368
- > def texts(value = false)
1369
-
1370
- Find all TextViews containing value.
1371
- If value is omitted, all texts are returned.
1372
-
1373
- __Parameters:__
1374
-
1375
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
1376
-
1377
- __Returns:__
1378
-
1379
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<TEXT_VIEW>]
1380
-
1381
- --
1382
-
1383
- ##### [first_text](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/text.rb#L43) android
1384
-
1385
- > def first_text
1386
-
1387
- Find the first TextView.
1388
-
1389
- __Returns:__
1390
-
1391
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[TEXT_VIEW]
1392
-
1393
- --
1394
-
1395
- ##### [last_text](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/text.rb#L49) android
1396
-
1397
- > def last_text
1398
-
1399
- Find the last TextView.
1400
-
1401
- __Returns:__
1402
-
1403
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[TEXT_VIEW]
1404
-
1405
- --
1406
-
1407
- ##### [text_exact](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/text.rb#L56) android
1408
-
1409
- > def text_exact(value)
1410
-
1411
- Find the first TextView that exactly matches value.
1412
-
1413
- __Parameters:__
1414
-
1415
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly
1416
-
1417
- __Returns:__
1418
-
1419
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[TEXT_VIEW]
1420
-
1421
- --
1422
-
1423
- ##### [texts_exact](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/text.rb#L63) android
1424
-
1425
- > def texts_exact(value)
1426
-
1427
- Find all TextViews that exactly match value.
1428
-
1429
- __Parameters:__
1430
-
1431
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly
1432
-
1433
- __Returns:__
1434
-
1435
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<TEXT_VIEW>]
1436
-
1437
- --
1438
-
1439
- ##### [result](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/helper.rb#L20) android
1440
-
1441
- > def result
1442
-
1443
- Returns the value of attribute result.
1444
-
1445
- --
1446
-
1447
- ##### [keys](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/helper.rb#L20) android
1448
-
1449
- > def keys
1450
-
1451
- Returns the value of attribute keys.
1452
-
1453
- --
1454
-
1455
- ##### [filter](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/helper.rb#L20) android
1456
-
1457
- > def filter
1458
-
1459
- Returns the value of attribute filter.
1460
-
1461
- --
1462
-
1463
- ##### [filter=](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/helper.rb#L23) android
1464
-
1465
- > def filter=(value)
1466
-
1467
- convert to string to support symbols
1468
-
1469
- --
1470
-
1471
- ##### [initialize](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/helper.rb#L30) android
1472
-
1473
- > def initialize
1474
-
1475
- rubocop:disable Lint/MissingSuper
1476
-
1477
- __Returns:__
1478
-
1479
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[AndroidElements] a new instance of AndroidElements
1480
-
1481
- --
1482
-
1483
- ##### [reset](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/helper.rb#L35) android
1484
-
1485
- > def reset
1486
-
1487
-
1488
-
1489
- --
1490
-
1491
- ##### [start_element](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/helper.rb#L41) android
1492
-
1493
- > def start_element(name, attrs = [], driver = $driver)
1494
-
1495
- http://nokogiri.org/Nokogiri/XML/SAX/Document.html
1496
-
1497
- --
1498
-
1499
- ##### [get_android_inspect](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/helper.rb#L95) android
1500
-
1501
- > def get_android_inspect(class_name = false)
1502
-
1503
- Android only.
1504
- Returns a string containing interesting elements.
1505
- The text, content description, and id are returned.
1506
- if false (default) then all classes will be inspected
1507
-
1508
- __Parameters:__
1509
-
1510
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class name to filter on.
1511
-
1512
- __Returns:__
1513
-
1514
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String]
1515
-
1516
- --
1517
-
1518
- ##### [page](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/helper.rb#L121) android
1519
-
1520
- > def page(opts = {})
1521
-
1522
- Intended for use with console.
1523
- Inspects and prints the current page.
1524
- Will return XHTML for Web contexts because of a quirk with Nokogiri.
1525
- if nil (default) then all classes will be inspected
1526
-
1527
- __Parameters:__
1528
-
1529
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Hash] class - a customizable set of options
1530
-
1531
- __Returns:__
1532
-
1533
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void]
1534
-
1535
- --
1536
-
1537
- ##### [id](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/helper.rb#L130) android
1538
-
1539
- > def id(id)
1540
-
1541
- Find the first matching element by id
1542
-
1543
- __Parameters:__
1544
-
1545
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] id - the id to search for
1546
-
1547
- __Returns:__
1548
-
1549
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1550
-
1551
- --
1552
-
1553
- ##### [ids](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/helper.rb#L138) android
1554
-
1555
- > def ids(id)
1556
-
1557
- Find all matching elements by id
1558
-
1559
- __Parameters:__
1560
-
1561
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] id - the id to search for
1562
-
1563
- __Returns:__
1564
-
1565
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1566
-
1567
- --
1568
-
1569
- ##### [ele_index](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/helper.rb#L147) android
1570
-
1571
- > def ele_index(class_name, index)
1572
-
1573
- Find the element of type class_name at matching index.
1574
-
1575
- __Parameters:__
1576
-
1577
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class name to find
1578
-
1579
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Integer] index - the index
1580
-
1581
- __Returns:__
1582
-
1583
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] the found element of type class_name
1584
-
1585
- --
1586
-
1587
- ##### [first_ele](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/helper.rb#L166) android
1588
-
1589
- > def first_ele(class_name)
1590
-
1591
- Find the first element that matches class_name
1592
-
1593
- __Parameters:__
1594
-
1595
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the tag to match
1596
-
1597
- __Returns:__
1598
-
1599
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1600
-
1601
- --
1602
-
1603
- ##### [last_ele](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/helper.rb#L173) android
1604
-
1605
- > def last_ele(class_name)
1606
-
1607
- Find the last element that matches class_name
1608
-
1609
- __Parameters:__
1610
-
1611
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the tag to match
1612
-
1613
- __Returns:__
1614
-
1615
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1616
-
1617
- --
1618
-
1619
- ##### [tag](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/helper.rb#L181) android
1620
-
1621
- > def tag(class_name)
1622
-
1623
- Find the first element of type class_name
1624
-
1625
- __Parameters:__
1626
-
1627
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class_name to search for
1628
-
1629
- __Returns:__
1630
-
1631
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1632
-
1633
- --
1634
-
1635
- ##### [tags](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/helper.rb#L189) android
1636
-
1637
- > def tags(class_name)
1638
-
1639
- Find all elements of type class_name
1640
-
1641
- __Parameters:__
1642
-
1643
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class_name to search for
1644
-
1645
- __Returns:__
1646
-
1647
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1648
-
1649
- --
1650
-
1651
- ##### [string_visible_contains_xpath](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/helper.rb#L232) android
1652
-
1653
- > def string_visible_contains_xpath(class_name, value)
1654
-
1655
- Returns a string that matches the first element that contains value
1656
- For automationName is uiautomator2
1657
- example: string_visible_contains_xpath 'UIATextField', 'sign in'
1658
- note for XPath: https://github.com/appium/ruby_lib/pull/561
1659
-
1660
- __Parameters:__
1661
-
1662
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class name for the element
1663
-
1664
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
1665
-
1666
- __Returns:__
1667
-
1668
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String]
1669
-
1670
- --
1671
-
1672
- ##### [string_visible_contains](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/helper.rb#L252) android
1673
-
1674
- > def string_visible_contains(class_name, value)
1675
-
1676
- Returns a string that matches the first element that contains value
1677
- For automationName is Appium
1678
- example: string_visible_contains 'UIATextField', 'sign in'
1679
- note for XPath: https://github.com/appium/ruby_lib/pull/561
1680
-
1681
- __Parameters:__
1682
-
1683
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class name for the element
1684
-
1685
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
1686
-
1687
- __Returns:__
1688
-
1689
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String]
1690
-
1691
- --
1692
-
1693
- ##### [complex_find_contains](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/helper.rb#L270) android
1694
-
1695
- > def complex_find_contains(class_name, value)
1696
-
1697
- Find the first element that contains value
1698
-
1699
- __Parameters:__
1700
-
1701
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class name for the element
1702
-
1703
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
1704
-
1705
- __Returns:__
1706
-
1707
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1708
-
1709
- --
1710
-
1711
- ##### [complex_finds_contains](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/helper.rb#L278) android
1712
-
1713
- > def complex_finds_contains(class_name, value)
1714
-
1715
- Find all elements containing value
1716
-
1717
- __Parameters:__
1718
-
1719
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class name for the element
1720
-
1721
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
1722
-
1723
- __Returns:__
1724
-
1725
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>]
1726
-
1727
- --
1728
-
1729
- ##### [complex_find_exact](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/helper.rb#L320) android
1730
-
1731
- > def complex_find_exact(class_name, value)
1732
-
1733
- Find the first element exactly matching value
1734
-
1735
- __Parameters:__
1736
-
1737
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class name for the element
1738
-
1739
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
1740
-
1741
- __Returns:__
1742
-
1743
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1744
-
1745
- --
1746
-
1747
- ##### [complex_finds_exact](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/helper.rb#L328) android
1748
-
1749
- > def complex_finds_exact(class_name, value)
1750
-
1751
- Find all elements exactly matching value
1752
-
1753
- __Parameters:__
1754
-
1755
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class name for the element
1756
-
1757
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
1758
-
1759
- __Returns:__
1760
-
1761
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1762
-
1763
- --
1764
-
1765
- ##### [alert_click](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/alert.rb#L20) android
1766
-
1767
- > def alert_click(value)
1768
-
1769
- Click the first alert button that contains value or by index.
1770
-
1771
- __Parameters:__
1772
-
1773
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Integer, String] value - either an integer index of the button or the button's name
1774
-
1775
- __Returns:__
1776
-
1777
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void]
1778
-
1779
- --
1780
-
1781
- ##### [alert_accept](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/alert.rb#L27) android
1782
-
1783
- > def alert_accept
1784
-
1785
- Accept the alert.
1786
- The last button is considered "accept."
1787
-
1788
- __Returns:__
1789
-
1790
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void]
1791
-
1792
- --
1793
-
1794
- ##### [alert_accept_text](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/alert.rb#L34) android
1795
-
1796
- > def alert_accept_text
1797
-
1798
- Get the text of the alert's accept button.
1799
- The last button is considered "accept."
1800
-
1801
- __Returns:__
1802
-
1803
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String]
1804
-
1805
- --
1806
-
1807
- ##### [alert_dismiss](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/alert.rb#L41) android
1808
-
1809
- > def alert_dismiss
1810
-
1811
- Dismiss the alert.
1812
- The first button is considered "dismiss."
1813
-
1814
- __Returns:__
1815
-
1816
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[void]
1817
-
1818
- --
1819
-
1820
- ##### [alert_dismiss_text](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/alert.rb#L48) android
1821
-
1822
- > def alert_dismiss_text
1823
-
1824
- Get the text of the alert's dismiss button.
1825
- The first button is considered "dismiss."
1826
-
1827
- __Returns:__
1828
-
1829
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String]
1830
-
1831
- --
1832
-
1833
- ##### [button](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/button.rb#L27) android
1834
-
1835
- > def button(value)
1836
-
1837
- Find the first button that contains value or by index.
1838
- If int then the button at that index is returned.
1839
-
1840
- __Parameters:__
1841
-
1842
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String, Integer] value - the value to exactly match.
1843
-
1844
- __Returns:__
1845
-
1846
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[BUTTON]
1847
-
1848
- --
1849
-
1850
- ##### [buttons](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/button.rb#L45) android
1851
-
1852
- > def buttons(value = false)
1853
-
1854
- Find all buttons containing value.
1855
- If value is omitted, all buttons are returned.
1856
-
1857
- __Parameters:__
1858
-
1859
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
1860
-
1861
- __Returns:__
1862
-
1863
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<BUTTON>]
1864
-
1865
- --
1866
-
1867
- ##### [first_button](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/button.rb#L53) android
1868
-
1869
- > def first_button
1870
-
1871
- Find the first button.
1872
-
1873
- __Returns:__
1874
-
1875
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[BUTTON]
1876
-
1877
- --
1878
-
1879
- ##### [last_button](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/button.rb#L59) android
1880
-
1881
- > def last_button
1882
-
1883
- Find the last button.
1884
-
1885
- __Returns:__
1886
-
1887
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[BUTTON]
1888
-
1889
- --
1890
-
1891
- ##### [button_exact](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/button.rb#L75) android
1892
-
1893
- > def button_exact(value)
1894
-
1895
- Find the first button that exactly matches value.
1896
-
1897
- __Parameters:__
1898
-
1899
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly
1900
-
1901
- __Returns:__
1902
-
1903
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[BUTTON]
1904
-
1905
- --
1906
-
1907
- ##### [buttons_exact](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/button.rb#L82) android
1908
-
1909
- > def buttons_exact(value)
1910
-
1911
- Find all buttons that exactly match value.
1912
-
1913
- __Parameters:__
1914
-
1915
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly
1916
-
1917
- __Returns:__
1918
-
1919
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<BUTTON>]
1920
-
1921
- --
1922
-
1923
- ##### [_button_visible_selectors](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/button.rb#L95) android
1924
-
1925
- > def _button_visible_selectors(opts = {})
1926
-
1927
-
1928
-
1929
- --
1930
-
1931
- ##### [_button_exact_string](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/button.rb#L108) android
1932
-
1933
- > def _button_exact_string(value)
1934
-
1935
-
1936
-
1937
- --
1938
-
1939
- ##### [_button_contains_string](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/button.rb#L114) android
1940
-
1941
- > def _button_contains_string(value)
1942
-
1943
-
1944
-
1945
- --
1946
-
1947
- ##### [find](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/generic.rb#L20) android
1948
-
1949
- > def find(value)
1950
-
1951
- Find the first element containing value
1952
-
1953
- __Parameters:__
1954
-
1955
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
1956
-
1957
- __Returns:__
1958
-
1959
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1960
-
1961
- --
1962
-
1963
- ##### [finds](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/generic.rb#L27) android
1964
-
1965
- > def finds(value)
1966
-
1967
- Find all elements containing value
1968
-
1969
- __Parameters:__
1970
-
1971
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
1972
-
1973
- __Returns:__
1974
-
1975
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>]
1976
-
1977
- --
1978
-
1979
- ##### [find_exact](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/generic.rb#L34) android
1980
-
1981
- > def find_exact(value)
1982
-
1983
- Find the first element exactly matching value
1984
-
1985
- __Parameters:__
1986
-
1987
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
1988
-
1989
- __Returns:__
1990
-
1991
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
1992
-
1993
- --
1994
-
1995
- ##### [finds_exact](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/generic.rb#L41) android
1996
-
1997
- > def finds_exact(value)
1998
-
1999
- Find all elements exactly matching value
2000
-
2001
- __Parameters:__
2002
-
2003
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2004
-
2005
- __Returns:__
2006
-
2007
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>]
2008
-
2009
- --
2010
-
2011
- ##### [scroll_to](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/generic.rb#L54) android
2012
-
2013
- > def scroll_to(text, scrollable_index = 0)
2014
-
2015
- Scroll to the first element containing target text or description.
2016
-
2017
- __Parameters:__
2018
-
2019
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] text - the text or resourceId to search for in the text value and content description
2020
-
2021
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Integer] scrollable_index - the index for scrollable views.
2022
-
2023
- __Returns:__
2024
-
2025
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] the element scrolled to
2026
-
2027
- --
2028
-
2029
- ##### [scroll_to_exact](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/generic.rb#L70) android
2030
-
2031
- > def scroll_to_exact(text, scrollable_index = 0)
2032
-
2033
- Scroll to the first element with the exact target text or description.
2034
-
2035
- __Parameters:__
2036
-
2037
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] text - the text or resourceId to search for in the text value and content description
2038
-
2039
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Integer] scrollable_index - the index for scrollable views.
2040
-
2041
- __Returns:__
2042
-
2043
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] the element scrolled to
2044
-
2045
- --
2046
-
2047
- ##### [for](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/espresso/bridge.rb#L21) android
2048
-
2049
- > def for(target)
2050
-
2051
-
2052
-
2053
- --
2054
-
2055
- ##### [complex_find_contains](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/espresso/helper.rb#L23) android
2056
-
2057
- > def complex_find_contains(class_name, value)
2058
-
2059
- Find the first element that contains value
2060
-
2061
- __Parameters:__
2062
-
2063
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class name for the element
2064
-
2065
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2066
-
2067
- __Returns:__
2068
-
2069
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
2070
-
2071
- --
2072
-
2073
- ##### [complex_finds_contains](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/espresso/helper.rb#L31) android
2074
-
2075
- > def complex_finds_contains(class_name, value)
2076
-
2077
- Find all elements containing value
2078
-
2079
- __Parameters:__
2080
-
2081
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class name for the element
2082
-
2083
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2084
-
2085
- __Returns:__
2086
-
2087
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>]
2088
-
2089
- --
2090
-
2091
- ##### [complex_find_exact](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/espresso/helper.rb#L39) android
2092
-
2093
- > def complex_find_exact(class_name, value)
2094
-
2095
- Find the first element exactly matching value
2096
-
2097
- __Parameters:__
2098
-
2099
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class name for the element
2100
-
2101
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2102
-
2103
- __Returns:__
2104
-
2105
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
2106
-
2107
- --
2108
-
2109
- ##### [complex_finds_exact](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/espresso/helper.rb#L47) android
2110
-
2111
- > def complex_finds_exact(class_name, value)
2112
-
2113
- Find all elements exactly matching value
2114
-
2115
- __Parameters:__
2116
-
2117
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class name for the element
2118
-
2119
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2120
-
2121
- __Returns:__
2122
-
2123
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
2124
-
2125
- --
2126
-
2127
- ##### [textfield](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/textfield.rb#L24) android
2128
-
2129
- > def textfield(value)
2130
-
2131
- Find the first EditText that contains value or by index.
2132
- If int then the EditText at that index is returned.
2133
-
2134
- __Parameters:__
2135
-
2136
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String, Integer] value - the text to match exactly.
2137
-
2138
- __Returns:__
2139
-
2140
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[EDIT_TEXT]
2141
-
2142
- --
2143
-
2144
- ##### [textfields](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/textfield.rb#L34) android
2145
-
2146
- > def textfields(value = false)
2147
-
2148
- Find all EditTexts containing value.
2149
- If value is omitted, all EditTexts are returned.
2150
-
2151
- __Parameters:__
2152
-
2153
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2154
-
2155
- __Returns:__
2156
-
2157
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<EDIT_TEXT>]
2158
-
2159
- --
2160
-
2161
- ##### [first_textfield](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/textfield.rb#L42) android
2162
-
2163
- > def first_textfield
2164
-
2165
- Find the first EditText.
2166
-
2167
- __Returns:__
2168
-
2169
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[EDIT_TEXT]
2170
-
2171
- --
2172
-
2173
- ##### [last_textfield](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/textfield.rb#L48) android
2174
-
2175
- > def last_textfield
2176
-
2177
- Find the last EditText.
2178
-
2179
- __Returns:__
2180
-
2181
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[EDIT_TEXT]
2182
-
2183
- --
2184
-
2185
- ##### [textfield_exact](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/textfield.rb#L55) android
2186
-
2187
- > def textfield_exact(value)
2188
-
2189
- Find the first EditText that exactly matches value.
2190
-
2191
- __Parameters:__
2192
-
2193
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly
2194
-
2195
- __Returns:__
2196
-
2197
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[EDIT_TEXT]
2198
-
2199
- --
2200
-
2201
- ##### [textfields_exact](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/element/textfield.rb#L62) android
2202
-
2203
- > def textfields_exact(value)
2204
-
2205
- Find all EditTexts that exactly match value.
2206
-
2207
- __Parameters:__
2208
-
2209
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly
2210
-
2211
- __Returns:__
2212
-
2213
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<EDIT_TEXT>]
2214
-
2215
- --
2216
-
2217
- ##### [for](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/uiautomator2/bridge.rb#L21) android
2218
-
2219
- > def for(target)
2220
-
2221
-
2222
-
2223
- --
2224
-
2225
- ##### [string_visible_contains](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/uiautomator2/helper.rb#L27) android
2226
-
2227
- > def string_visible_contains(class_name, value)
2228
-
2229
- Returns a string that matches the first element that contains value
2230
- For automationName is Appium
2231
- example: string_visible_contains 'UIATextField', 'sign in'
2232
- note for XPath: https://github.com/appium/ruby_lib/pull/561
2233
-
2234
- __Parameters:__
2235
-
2236
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class name for the element
2237
-
2238
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2239
-
2240
- __Returns:__
2241
-
2242
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String]
2243
-
2244
- --
2245
-
2246
- ##### [complex_find_contains](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/uiautomator2/helper.rb#L45) android
2247
-
2248
- > def complex_find_contains(class_name, value)
2249
-
2250
- Find the first element that contains value
2251
-
2252
- __Parameters:__
2253
-
2254
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class name for the element
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
- ##### [complex_finds_contains](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/uiautomator2/helper.rb#L56) android
2265
-
2266
- > def complex_finds_contains(class_name, value)
2267
-
2268
- Find all elements containing value
2269
-
2270
- __Parameters:__
2271
-
2272
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class name for the element
2273
-
2274
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2275
-
2276
- __Returns:__
2277
-
2278
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Element>]
2279
-
2280
- --
2281
-
2282
- ##### [complex_find_exact](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/uiautomator2/helper.rb#L84) android
2283
-
2284
- > def complex_find_exact(class_name, value)
2285
-
2286
- Find the first element exactly matching value
2287
-
2288
- __Parameters:__
2289
-
2290
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class name for the element
2291
-
2292
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2293
-
2294
- __Returns:__
2295
-
2296
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
2297
-
2298
- --
2299
-
2300
- ##### [complex_finds_exact](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/uiautomator2/helper.rb#L95) android
2301
-
2302
- > def complex_finds_exact(class_name, value)
2303
-
2304
- Find all elements exactly matching value
2305
-
2306
- __Parameters:__
2307
-
2308
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] class_name - the class name for the element
2309
-
2310
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2311
-
2312
- __Returns:__
2313
-
2314
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element]
2315
-
2316
- --
2317
-
2318
- ##### [shell](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/command/command.rb#L28) android
2319
-
2320
- > def shell(command, arguments)
2321
-
2322
- Conduct an adb shell script on Appium server.
2323
- Require `--relaxed-security` arguments when run Appium server as server side arguments.
2324
-
2325
- __Parameters:__
2326
-
2327
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] command - Command for "adb shell"
2328
-
2329
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array] arguments - Arguments for the adb command
2330
-
2331
- --
2332
-
2333
- ##### [start_logs_broadcast](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/command/command.rb#L42) android
2334
-
2335
- > def start_logs_broadcast(logcat_file = 'logcat.log')
2336
-
2337
- Starts Android logcat broadcast websocket
2338
-
2339
- __Parameters:__
2340
-
2341
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] logcat_file - A file path to write messages from a logcat WebSocket client
2342
-
2343
- --
2344
-
2345
- ##### [stop_logs_broadcast](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/common/command/command.rb#L55) android
2346
-
2347
- > def stop_logs_broadcast
2348
-
2349
- Stop Android logcat broadcast websocket
2350
-
2351
- --
2352
-
2353
- ##### [button](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/espresso/element/button.rb#L23) android
2354
-
2355
- > def button(value)
2356
-
2357
- Find the first button that contains value or by index.
2358
- If int then the button at that index is returned.
2359
-
2360
- __Parameters:__
2361
-
2362
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String, Integer] value - the value to exactly match.
2363
-
2364
- __Returns:__
2365
-
2366
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Button]
2367
-
2368
- --
2369
-
2370
- ##### [buttons](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/espresso/element/button.rb#L46) android
2371
-
2372
- > def buttons(value = false)
2373
-
2374
- Find all buttons containing value.
2375
- If value is omitted, all buttons are returned.
2376
-
2377
- __Parameters:__
2378
-
2379
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2380
-
2381
- __Returns:__
2382
-
2383
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Button>]
2384
-
2385
- --
2386
-
2387
- ##### [first_button](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/espresso/element/button.rb#L56) android
2388
-
2389
- > def first_button
2390
-
2391
- Find the first button.
2392
-
2393
- __Returns:__
2394
-
2395
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Button]
2396
-
2397
- --
2398
-
2399
- ##### [last_button](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/espresso/element/button.rb#L62) android
2400
-
2401
- > def last_button
2402
-
2403
- Find the last button.
2404
-
2405
- __Returns:__
2406
-
2407
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Button]
2408
-
2409
- --
2410
-
2411
- ##### [button_exact](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/espresso/element/button.rb#L77) android
2412
-
2413
- > def button_exact(value)
2414
-
2415
- Find the first button that exactly matches value.
2416
-
2417
- __Parameters:__
2418
-
2419
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly
2420
-
2421
- __Returns:__
2422
-
2423
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Button]
2424
-
2425
- --
2426
-
2427
- ##### [buttons_exact](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/espresso/element/button.rb#L89) android
2428
-
2429
- > def buttons_exact(value)
2430
-
2431
- Find all buttons that exactly match value.
2432
-
2433
- __Parameters:__
2434
-
2435
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly
2436
-
2437
- __Returns:__
2438
-
2439
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Button>]
2440
-
2441
- --
2442
-
2443
- ##### [_button_visible_selectors_xpath](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/espresso/element/button.rb#L104) android
2444
-
2445
- > def _button_visible_selectors_xpath(opts = {})
2446
-
2447
-
2448
-
2449
- --
2450
-
2451
- ##### [_button_exact_string_xpath](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/espresso/element/button.rb#L125) android
2452
-
2453
- > def _button_exact_string_xpath(class_name, value)
2454
-
2455
-
2456
-
2457
- --
2458
-
2459
- ##### [_button_contains_string_xpath](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/espresso/element/button.rb#L130) android
2460
-
2461
- > def _button_contains_string_xpath(class_name, value)
2462
-
2463
-
2464
-
2465
- --
2466
-
2467
- ##### [scroll_to](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/espresso/element/generic.rb#L23) android
2468
-
2469
- > def scroll_to(text)
2470
-
2471
- Scroll to the first element containing target text or description.
2472
- Scroll happens upto 30 times in centre of device width.
2473
-
2474
- __Parameters:__
2475
-
2476
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] text - the text or resourceId to search for in the text value and content description
2477
-
2478
- __Returns:__
2479
-
2480
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] the element scrolled to
2481
-
2482
- --
2483
-
2484
- ##### [scroll_to_exact](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/espresso/element/generic.rb#L48) android
2485
-
2486
- > def scroll_to_exact(text)
2487
-
2488
- Scroll to the first element with the exact target text or description.
2489
- Scroll happens upto 30 times in centre of device width.
2490
-
2491
- __Parameters:__
2492
-
2493
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] text - the text or resourceId to search for in the text value and content description
2494
-
2495
- __Returns:__
2496
-
2497
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Element] the element scrolled to
2498
-
2499
- --
2500
-
2501
- ##### [button](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/uiautomator2/element/button.rb#L23) android
2502
-
2503
- > def button(value)
2504
-
2505
- Find the first button that contains value or by index.
2506
- If int then the button at that index is returned.
2507
-
2508
- __Parameters:__
2509
-
2510
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String, Integer] value - the value to exactly match.
2511
-
2512
- __Returns:__
2513
-
2514
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Button]
2515
-
2516
- --
2517
-
2518
- ##### [buttons](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/uiautomator2/element/button.rb#L44) android
2519
-
2520
- > def buttons(value = false)
2521
-
2522
- Find all buttons containing value.
2523
- If value is omitted, all buttons are returned.
2524
-
2525
- __Parameters:__
2526
-
2527
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to search for
2528
-
2529
- __Returns:__
2530
-
2531
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Button>]
2532
-
2533
- --
2534
-
2535
- ##### [first_button](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/uiautomator2/element/button.rb#L52) android
2536
-
2537
- > def first_button
2538
-
2539
- Find the first button.
2540
-
2541
- __Returns:__
2542
-
2543
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Button]
2544
-
2545
- --
2546
-
2547
- ##### [last_button](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/uiautomator2/element/button.rb#L59) android
2548
-
2549
- > def last_button
2550
-
2551
- Find the last button.
2552
-
2553
- __Returns:__
2554
-
2555
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Button]
2556
-
2557
- --
2558
-
2559
- ##### [button_exact](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/uiautomator2/element/button.rb#L76) android
2560
-
2561
- > def button_exact(value)
2562
-
2563
- Find the first button that exactly matches value.
2564
-
2565
- __Parameters:__
2566
-
2567
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly
2568
-
2569
- __Returns:__
2570
-
2571
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Button]
2572
-
2573
- --
2574
-
2575
- ##### [buttons_exact](https://github.com/appium/ruby_lib/blob/203a6052db42039c89cd000f245f1534379bc86b/lib/appium_lib/android/uiautomator2/element/button.rb#L84) android
2576
-
2577
- > def buttons_exact(value)
2578
-
2579
- Find all buttons that exactly match value.
2580
-
2581
- __Parameters:__
2582
-
2583
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[String] value - the value to match exactly
2584
-
2585
- __Returns:__
2586
-
2587
- &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[Array<Button>]
2588
-
2589
- --
2590
-