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