appium_lib 9.6.1 → 9.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -2
- data/CHANGELOG.md +43 -0
- data/Rakefile +1 -1
- data/appium_lib.gemspec +1 -1
- data/docs/android_docs.md +440 -1295
- data/docs/docs.md +10 -103
- data/docs/index_paths.md +2 -0
- data/docs/ios_docs.md +725 -1674
- data/docs/migration.md +17 -0
- data/lib/appium_lib.rb +1 -2
- data/lib/appium_lib/android/android.rb +20 -0
- data/lib/appium_lib/android/{helper.rb → common/helper.rb} +1 -1
- data/lib/appium_lib/android/uiautomator2.rb +5 -4
- data/lib/appium_lib/android/uiautomator2/bridge.rb +16 -0
- data/lib/appium_lib/appium.rb +201 -0
- data/lib/appium_lib/common/helper.rb +18 -20
- data/lib/appium_lib/common/log.rb +24 -0
- data/lib/appium_lib/common/multi_touch.rb +89 -0
- data/lib/appium_lib/common/touch_actions.rb +48 -0
- data/lib/appium_lib/common/wait.rb +10 -49
- data/lib/appium_lib/core/android.rb +4 -0
- data/lib/appium_lib/core/android/device.rb +142 -0
- data/lib/appium_lib/core/android/search_context.rb +17 -0
- data/lib/appium_lib/core/android/uiautomator1/bridge.rb +16 -0
- data/lib/appium_lib/core/android/uiautomator2/bridge.rb +16 -0
- data/lib/appium_lib/core/android_uiautomator2.rb +4 -0
- data/lib/appium_lib/core/common.rb +6 -0
- data/lib/appium_lib/core/common/base.rb +8 -0
- data/lib/appium_lib/core/common/base/bridge.rb +47 -0
- data/lib/appium_lib/core/common/base/capabilities.rb +16 -0
- data/lib/appium_lib/core/common/base/command.rb +10 -0
- data/lib/appium_lib/core/common/base/driver.rb +40 -0
- data/lib/appium_lib/core/common/base/http_default.rb +12 -0
- data/lib/appium_lib/core/common/base/search_context.rb +89 -0
- data/lib/appium_lib/core/common/base/wait.rb +56 -0
- data/lib/appium_lib/{common → core/common}/command.rb +20 -16
- data/lib/appium_lib/core/common/device.rb +470 -0
- data/lib/appium_lib/core/common/error.rb +13 -0
- data/lib/appium_lib/core/common/log.rb +30 -0
- data/lib/appium_lib/{logger.rb → core/common/logger.rb} +2 -0
- data/lib/appium_lib/core/core.rb +38 -0
- data/lib/appium_lib/core/device/multi_touch.rb +213 -0
- data/lib/appium_lib/core/device/touch_actions.rb +206 -0
- data/lib/appium_lib/core/driver.rb +274 -0
- data/lib/appium_lib/core/ios.rb +6 -0
- data/lib/appium_lib/core/ios/device.rb +44 -0
- data/lib/appium_lib/core/ios/search_context.rb +27 -0
- data/lib/appium_lib/core/ios/uiautomation/bridge.rb +17 -0
- data/lib/appium_lib/core/ios/uiautomation/patch.rb +20 -0
- data/lib/appium_lib/core/ios/xcuitest/bridge.rb +18 -0
- data/lib/appium_lib/{ios → core/ios}/xcuitest/device.rb +5 -5
- data/lib/appium_lib/{ios → core/ios}/xcuitest/search_context.rb +13 -9
- data/lib/appium_lib/core/ios_xcuitest.rb +7 -0
- data/lib/appium_lib/core/patch.rb +56 -0
- data/lib/appium_lib/driver.rb +174 -446
- data/lib/appium_lib/ios/{errors.rb → common/errors.rb} +0 -0
- data/lib/appium_lib/ios/{helper.rb → common/helper.rb} +9 -110
- data/lib/appium_lib/ios/ios.rb +20 -0
- data/lib/appium_lib/ios/xcuitest.rb +1 -3
- data/lib/appium_lib/ios/xcuitest/bridge.rb +19 -0
- data/lib/appium_lib/ios/xcuitest/command.rb +4 -1
- data/lib/appium_lib/ios/xcuitest/{gestures.rb → command/gestures.rb} +1 -1
- data/lib/appium_lib/ios/xcuitest/element.rb +1 -18
- data/lib/appium_lib/ios/xcuitest/helper.rb +0 -6
- data/lib/appium_lib/sauce_labs.rb +29 -0
- data/lib/appium_lib/version.rb +5 -0
- data/release_notes.md +8 -0
- metadata +50 -25
- data/lib/appium_lib/android/client_xpath.rb +0 -51
- data/lib/appium_lib/android/device.rb +0 -39
- data/lib/appium_lib/android/mobile_methods.rb +0 -15
- data/lib/appium_lib/android/patch.rb +0 -16
- data/lib/appium_lib/capabilities.rb +0 -13
- data/lib/appium_lib/common/element/window.rb +0 -10
- data/lib/appium_lib/common/error.rb +0 -8
- data/lib/appium_lib/common/patch.rb +0 -190
- data/lib/appium_lib/common/search_context.rb +0 -10
- data/lib/appium_lib/common/version.rb +0 -5
- data/lib/appium_lib/device/device.rb +0 -611
- data/lib/appium_lib/device/multi_touch.rb +0 -225
- data/lib/appium_lib/device/touch_actions.rb +0 -230
- data/lib/appium_lib/ios/mobile_methods.rb +0 -25
- data/lib/appium_lib/ios/patch.rb +0 -22
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bfe04ea0b58f4eaaeac5ab655181d8ea90b145cb
|
|
4
|
+
data.tar.gz: e1b3064ff57970e59291e35e37b9bd6276281974
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c98dd3c7ba086b0573a98f2f151617a860646829601f27eba211147576eff1a29422534d7ede0f9ebedf23d0d3f5be44dff7780c1cfcf743ee86ab1d64976b62
|
|
7
|
+
data.tar.gz: 54cd9b333aa3cc7780f2fa81ed4866ef1373d97f42ffe0009ba25f6e41a3bafed556867a809bb675f84ac16b468e6f5f757841f1c928c7cc3c8b263ea9a3ac7c
|
data/.rubocop.yml
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Custom config for RuboCop static code analysis
|
|
2
2
|
Metrics/LineLength:
|
|
3
|
-
Max:
|
|
3
|
+
Max: 128
|
|
4
4
|
Metrics/MethodLength:
|
|
5
5
|
Enabled: false
|
|
6
6
|
Metrics/ModuleLength:
|
|
@@ -21,7 +21,7 @@ Style/RegexpLiteral:
|
|
|
21
21
|
Enabled: false
|
|
22
22
|
Style/ConstantName:
|
|
23
23
|
Enabled: false
|
|
24
|
-
# blocked on https://github.com/appium/ruby_lib/issues/312
|
|
24
|
+
# blocked on https://github.com/appium/ruby_lib/issues/312. Already removed from core part
|
|
25
25
|
Style/GlobalVars:
|
|
26
26
|
Enabled: false
|
|
27
27
|
Style/AccessorMethodName:
|
data/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,43 @@ 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
|
+
## v9.7.0
|
|
7
|
+
|
|
8
|
+
_v9.7.0_ has [a bunch of refactoring](https://github.com/appium/ruby_lib/issues/602#issuecomment-331140219) but the behaviours must be the same as well as previous versions.
|
|
9
|
+
I've checked the behaviour and confirmed test cases in this repository. So, please create issues if you have any issues against this version.
|
|
10
|
+
|
|
11
|
+
### 1. Enhancements
|
|
12
|
+
- Refactoring
|
|
13
|
+
```
|
|
14
|
+
lib/appium_lib # root directory
|
|
15
|
+
/core # Minumul driver files for the Appium server and dependencies for Selenium Driver.
|
|
16
|
+
/common # Appium related(some methods to make ruby_lib useful)
|
|
17
|
+
/android # for Android
|
|
18
|
+
/ios # for iOS
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
- The `core` directory will separate as the other gem in [separate core as core ruby gem #665](https://github.com/appium/ruby_lib/issues/665)
|
|
22
|
+
- Logs
|
|
23
|
+
- `get_available_log_types`: To get a list of available log types
|
|
24
|
+
- `get_log(type)`: To get logs associated with `type`
|
|
25
|
+
|
|
26
|
+
### 2. Bug fixes
|
|
27
|
+
|
|
28
|
+
### 3. Deprecations
|
|
29
|
+
- [refactor: Reduce patch_webdriver_element and some DEPRECATIONs #663](https://github.com/appium/ruby_lib/pull/663)
|
|
30
|
+
- Remove deprecated methods:
|
|
31
|
+
- Android
|
|
32
|
+
- `client_xpath/client_xpaths`
|
|
33
|
+
- Please use `xpath` or `find_element/s(:xpath, "xpaths")`
|
|
34
|
+
- iOS
|
|
35
|
+
- `get_page`
|
|
36
|
+
- Please use `source` instead
|
|
37
|
+
- Deprecated
|
|
38
|
+
- iOS
|
|
39
|
+
- `ios_version`, `source_window`, `page_window`
|
|
40
|
+
- Please use `source` instead
|
|
41
|
+
|
|
42
|
+
|
|
6
43
|
## v9.6.1
|
|
7
44
|
### 1. Enhancements
|
|
8
45
|
- Refactor `XCUItest` for iOS and `uiautomator2` for Android a bit
|
|
@@ -15,6 +52,12 @@ Release tags are https://github.com/appium/ruby_lib/releases .
|
|
|
15
52
|
## v9.6.0
|
|
16
53
|
### 1. Enhancements
|
|
17
54
|
- Reduce Global Driver
|
|
55
|
+
- We'll stop defining global scope driver by default. So, if you'd like to continue to define global scope, please call `start_driver` as the following.
|
|
56
|
+
```ruby
|
|
57
|
+
Appium::Driver.new(opts, true).start_driver # $driver is defined.
|
|
58
|
+
Appium::Driver.new(opts, false).start_driver # $driver isn't defined.
|
|
59
|
+
```
|
|
60
|
+
- [link](https://github.com/appium/ruby_lib/blob/master/docs/ios_docs.md#initialize)
|
|
18
61
|
- We need to provide `driver` to work `TouchAction` and `MultiAction` without global driver
|
|
19
62
|
- `TouchAction`
|
|
20
63
|
```ruby
|
data/Rakefile
CHANGED
data/appium_lib.gemspec
CHANGED
data/docs/android_docs.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
##### [load_settings](https://github.com/appium/ruby_lib/blob/
|
|
1
|
+
##### [load_settings](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/appium.rb#L44)
|
|
2
2
|
|
|
3
|
-
> def
|
|
3
|
+
> def load_settings(opts = {})
|
|
4
4
|
|
|
5
5
|
Load arbitrary text ([toml format](https://github.com/toml-lang/toml))
|
|
6
6
|
The toml is parsed by https://github.com/fbernier/tomlrb .
|
|
@@ -27,9 +27,9 @@ __Returns:__
|
|
|
27
27
|
|
|
28
28
|
--
|
|
29
29
|
|
|
30
|
-
##### [load_appium_txt](https://github.com/appium/ruby_lib/blob/
|
|
30
|
+
##### [load_appium_txt](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/appium.rb#L77)
|
|
31
31
|
|
|
32
|
-
> def
|
|
32
|
+
> def load_settings(opts = {})
|
|
33
33
|
|
|
34
34
|
Load arbitrary text ([toml format](https://github.com/toml-lang/toml))
|
|
35
35
|
The toml is parsed by https://github.com/fbernier/tomlrb .
|
|
@@ -45,7 +45,6 @@ port = 8080
|
|
|
45
45
|
:app is expanded
|
|
46
46
|
:require is expanded
|
|
47
47
|
all keys are converted to symbols
|
|
48
|
-
rubocop:disable Style/Alias
|
|
49
48
|
|
|
50
49
|
__Parameters:__
|
|
51
50
|
|
|
@@ -57,9 +56,9 @@ __Returns:__
|
|
|
57
56
|
|
|
58
57
|
--
|
|
59
58
|
|
|
60
|
-
##### [expand_required_files](https://github.com/appium/ruby_lib/blob/
|
|
59
|
+
##### [expand_required_files](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/appium.rb#L82)
|
|
61
60
|
|
|
62
|
-
> def
|
|
61
|
+
> def expand_required_files(base_dir, file_paths)
|
|
63
62
|
|
|
64
63
|
|
|
65
64
|
|
|
@@ -75,20 +74,9 @@ __Returns:__
|
|
|
75
74
|
|
|
76
75
|
--
|
|
77
76
|
|
|
78
|
-
##### [
|
|
77
|
+
##### [promote_singleton_appium_methods](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/appium.rb#L121)
|
|
79
78
|
|
|
80
|
-
> def
|
|
81
|
-
|
|
82
|
-
convert all keys (including nested) to symbols
|
|
83
|
-
|
|
84
|
-
based on deep_symbolize_keys & deep_transform_keys from rails
|
|
85
|
-
https://github.com/rails/docrails/blob/a3b1105ada3da64acfa3843b164b14b734456a50/activesupport/lib/active_support/core_ext/hash/keys.rb#L84
|
|
86
|
-
|
|
87
|
-
--
|
|
88
|
-
|
|
89
|
-
##### [promote_singleton_appium_methods](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/driver.rb#L180)
|
|
90
|
-
|
|
91
|
-
> def self.promote_singleton_appium_methods(modules, driver = $driver)
|
|
79
|
+
> def promote_singleton_appium_methods(modules, driver = $driver)
|
|
92
80
|
|
|
93
81
|
This method is intended to work with page objects that share
|
|
94
82
|
a common module. For example, Page::HomePage, Page::SignIn
|
|
@@ -104,9 +92,9 @@ otherwise, the array of modules will be used as the promotion target.
|
|
|
104
92
|
|
|
105
93
|
--
|
|
106
94
|
|
|
107
|
-
##### [promote_appium_methods](https://github.com/appium/ruby_lib/blob/
|
|
95
|
+
##### [promote_appium_methods](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/appium.rb#L174)
|
|
108
96
|
|
|
109
|
-
> def
|
|
97
|
+
> def promote_appium_methods(class_array, driver = $driver)
|
|
110
98
|
|
|
111
99
|
Promote appium methods to class instance methods
|
|
112
100
|
|
|
@@ -134,19 +122,7 @@ __Parameters:__
|
|
|
134
122
|
|
|
135
123
|
--
|
|
136
124
|
|
|
137
|
-
##### [
|
|
138
|
-
|
|
139
|
-
> def self.selenium_webdriver_version_more?(version)
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
__Returns:__
|
|
144
|
-
|
|
145
|
-
[Boolean]
|
|
146
|
-
|
|
147
|
-
--
|
|
148
|
-
|
|
149
|
-
##### [global_webdriver_http_sleep](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/driver.rb#L272)
|
|
125
|
+
##### [global_webdriver_http_sleep](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L24)
|
|
150
126
|
|
|
151
127
|
> def global_webdriver_http_sleep
|
|
152
128
|
|
|
@@ -154,7 +130,7 @@ The amount to sleep in seconds before every webdriver http call.
|
|
|
154
130
|
|
|
155
131
|
--
|
|
156
132
|
|
|
157
|
-
##### [global_webdriver_http_sleep=](https://github.com/appium/ruby_lib/blob/
|
|
133
|
+
##### [global_webdriver_http_sleep=](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L24)
|
|
158
134
|
|
|
159
135
|
> def global_webdriver_http_sleep=(value)
|
|
160
136
|
|
|
@@ -162,170 +138,166 @@ The amount to sleep in seconds before every webdriver http call.
|
|
|
162
138
|
|
|
163
139
|
--
|
|
164
140
|
|
|
165
|
-
##### [
|
|
141
|
+
##### [sauce](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L27)
|
|
166
142
|
|
|
167
|
-
> def
|
|
143
|
+
> def sauce
|
|
168
144
|
|
|
169
|
-
|
|
145
|
+
SauceLab's settings
|
|
170
146
|
|
|
171
147
|
--
|
|
172
148
|
|
|
173
|
-
##### [
|
|
149
|
+
##### [sauce_username](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L30)
|
|
174
150
|
|
|
175
|
-
> def
|
|
151
|
+
> def sauce_username
|
|
176
152
|
|
|
177
|
-
|
|
153
|
+
Username for use on Sauce Labs. Set `false` to disable Sauce, even when SAUCE_USERNAME is in ENV.
|
|
154
|
+
same as @sauce.username
|
|
178
155
|
|
|
179
156
|
--
|
|
180
157
|
|
|
181
|
-
##### [
|
|
158
|
+
##### [sauce_access_key](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L33)
|
|
182
159
|
|
|
183
|
-
> def
|
|
160
|
+
> def sauce_access_key
|
|
184
161
|
|
|
185
|
-
|
|
162
|
+
Access Key for use on Sauce Labs. Set `false` to disable Sauce, even when SAUCE_ACCESS_KEY is in ENV.
|
|
163
|
+
same as @sauce.access_key
|
|
186
164
|
|
|
187
165
|
--
|
|
188
166
|
|
|
189
|
-
##### [
|
|
167
|
+
##### [sauce_endpoint](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L36)
|
|
190
168
|
|
|
191
|
-
> def
|
|
169
|
+
> def sauce_endpoint
|
|
192
170
|
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
This value is independent of what the server is using
|
|
171
|
+
Override the Sauce Appium endpoint to allow e.g. TestObject tests
|
|
172
|
+
same as @sauce.endpoint
|
|
196
173
|
|
|
197
|
-
|
|
174
|
+
--
|
|
198
175
|
|
|
199
|
-
|
|
176
|
+
##### [caps](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L39)
|
|
177
|
+
|
|
178
|
+
> def caps
|
|
179
|
+
|
|
180
|
+
from Core
|
|
200
181
|
|
|
201
182
|
--
|
|
202
183
|
|
|
203
|
-
##### [
|
|
184
|
+
##### [custom_url](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L40)
|
|
204
185
|
|
|
205
|
-
> def
|
|
186
|
+
> def custom_url
|
|
206
187
|
|
|
207
|
-
|
|
188
|
+
Returns the value of attribute custom_url
|
|
208
189
|
|
|
209
190
|
--
|
|
210
191
|
|
|
211
|
-
##### [
|
|
192
|
+
##### [export_session](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L41)
|
|
212
193
|
|
|
213
|
-
> def
|
|
194
|
+
> def export_session
|
|
214
195
|
|
|
215
|
-
|
|
196
|
+
Returns the value of attribute export_session
|
|
216
197
|
|
|
217
198
|
--
|
|
218
199
|
|
|
219
|
-
##### [
|
|
200
|
+
##### [default_wait](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L42)
|
|
220
201
|
|
|
221
|
-
> def
|
|
202
|
+
> def default_wait
|
|
222
203
|
|
|
223
|
-
|
|
204
|
+
Returns the value of attribute default_wait
|
|
224
205
|
|
|
225
206
|
--
|
|
226
207
|
|
|
227
|
-
##### [appium_port](https://github.com/appium/ruby_lib/blob/
|
|
208
|
+
##### [appium_port](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L43)
|
|
228
209
|
|
|
229
210
|
> def appium_port
|
|
230
211
|
|
|
231
|
-
|
|
212
|
+
Returns the value of attribute appium_port
|
|
232
213
|
|
|
233
214
|
--
|
|
234
215
|
|
|
235
|
-
##### [appium_device](https://github.com/appium/ruby_lib/blob/
|
|
216
|
+
##### [appium_device](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L44)
|
|
236
217
|
|
|
237
218
|
> def appium_device
|
|
238
219
|
|
|
239
|
-
|
|
220
|
+
Returns the value of attribute appium_device
|
|
240
221
|
|
|
241
222
|
--
|
|
242
223
|
|
|
243
|
-
##### [automation_name](https://github.com/appium/ruby_lib/blob/
|
|
224
|
+
##### [automation_name](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L45)
|
|
244
225
|
|
|
245
226
|
> def automation_name
|
|
246
227
|
|
|
247
|
-
|
|
248
|
-
If automation_name is nil, it is not set both client side and server side.
|
|
228
|
+
Returns the value of attribute automation_name
|
|
249
229
|
|
|
250
230
|
--
|
|
251
231
|
|
|
252
|
-
##### [
|
|
232
|
+
##### [listener](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L46)
|
|
253
233
|
|
|
254
|
-
> def
|
|
234
|
+
> def listener
|
|
255
235
|
|
|
256
|
-
|
|
236
|
+
Returns the value of attribute listener
|
|
257
237
|
|
|
258
238
|
--
|
|
259
239
|
|
|
260
|
-
##### [
|
|
240
|
+
##### [http_client](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L47)
|
|
261
241
|
|
|
262
|
-
> def
|
|
242
|
+
> def http_client
|
|
263
243
|
|
|
264
|
-
|
|
244
|
+
Returns the value of attribute http_client
|
|
265
245
|
|
|
266
246
|
--
|
|
267
247
|
|
|
268
|
-
##### [
|
|
248
|
+
##### [appium_wait_timeout](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L48)
|
|
269
249
|
|
|
270
|
-
> def
|
|
250
|
+
> def appium_wait_timeout
|
|
271
251
|
|
|
272
|
-
|
|
252
|
+
Returns the value of attribute appium_wait_timeout
|
|
273
253
|
|
|
274
254
|
--
|
|
275
255
|
|
|
276
|
-
##### [
|
|
256
|
+
##### [appium_wait_interval](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L49)
|
|
277
257
|
|
|
278
|
-
> def
|
|
258
|
+
> def appium_wait_interval
|
|
279
259
|
|
|
280
|
-
Returns the
|
|
260
|
+
Returns the value of attribute appium_wait_interval
|
|
281
261
|
|
|
282
|
-
|
|
262
|
+
--
|
|
283
263
|
|
|
284
|
-
|
|
264
|
+
##### [appium_server_status](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L52)
|
|
285
265
|
|
|
286
|
-
|
|
266
|
+
> def appium_server_status
|
|
287
267
|
|
|
288
|
-
|
|
268
|
+
Appium's server version
|
|
289
269
|
|
|
290
|
-
|
|
270
|
+
--
|
|
291
271
|
|
|
292
|
-
|
|
272
|
+
##### [appium_debug](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L54)
|
|
293
273
|
|
|
294
|
-
|
|
274
|
+
> def appium_debug
|
|
295
275
|
|
|
296
|
-
|
|
276
|
+
Boolean debug mode for the Appium Ruby bindings
|
|
297
277
|
|
|
298
278
|
--
|
|
299
279
|
|
|
300
|
-
##### [
|
|
280
|
+
##### [driver](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L57)
|
|
301
281
|
|
|
302
|
-
> def
|
|
282
|
+
> def driver
|
|
303
283
|
|
|
304
|
-
|
|
305
|
-
Wait time for ::Appium::Common.wait or ::Appium::Common.wait_true.
|
|
306
|
-
Provide Appium::Drive like { appium_lib: { wait_timeout: 20 } }
|
|
284
|
+
Returns the driver
|
|
307
285
|
|
|
308
286
|
__Returns:__
|
|
309
287
|
|
|
310
|
-
[
|
|
288
|
+
[Driver] the driver
|
|
311
289
|
|
|
312
290
|
--
|
|
313
291
|
|
|
314
|
-
##### [
|
|
315
|
-
|
|
316
|
-
> def appium_wait_interval
|
|
317
|
-
|
|
318
|
-
Return a time wait timeout
|
|
319
|
-
Wait interval time for ::Appium::Common.wait or ::Appium::Common.wait_true.
|
|
320
|
-
Provide Appium::Drive like { appium_lib: { wait_interval: 20 } }
|
|
292
|
+
##### [core](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L59)
|
|
321
293
|
|
|
322
|
-
|
|
294
|
+
> def core
|
|
323
295
|
|
|
324
|
-
|
|
296
|
+
Instance of Appium::Core::Driver
|
|
325
297
|
|
|
326
298
|
--
|
|
327
299
|
|
|
328
|
-
##### [initialize](https://github.com/appium/ruby_lib/blob/
|
|
300
|
+
##### [initialize](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L113)
|
|
329
301
|
|
|
330
302
|
> def initialize(opts = {}, global_driver = nil)
|
|
331
303
|
|
|
@@ -344,25 +316,29 @@ __Returns:__
|
|
|
344
316
|
|
|
345
317
|
--
|
|
346
318
|
|
|
347
|
-
##### [
|
|
348
|
-
|
|
349
|
-
> def set_appium_lib_specific_values(appium_lib_opts)
|
|
319
|
+
##### [driver_attributes](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L218)
|
|
350
320
|
|
|
321
|
+
> def driver_attributes
|
|
351
322
|
|
|
323
|
+
Returns a hash of the driver attributes
|
|
352
324
|
|
|
353
325
|
--
|
|
354
326
|
|
|
355
|
-
##### [
|
|
327
|
+
##### [device_is_android?](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L237)
|
|
356
328
|
|
|
357
|
-
> def
|
|
329
|
+
> def device_is_android?
|
|
358
330
|
|
|
359
|
-
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
__Returns:__
|
|
334
|
+
|
|
335
|
+
[Boolean]
|
|
360
336
|
|
|
361
337
|
--
|
|
362
338
|
|
|
363
|
-
##### [
|
|
339
|
+
##### [device_is_ios?](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L241)
|
|
364
340
|
|
|
365
|
-
> def
|
|
341
|
+
> def device_is_ios?
|
|
366
342
|
|
|
367
343
|
|
|
368
344
|
|
|
@@ -372,11 +348,11 @@ __Returns:__
|
|
|
372
348
|
|
|
373
349
|
--
|
|
374
350
|
|
|
375
|
-
##### [
|
|
351
|
+
##### [device_is_windows?](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L245)
|
|
352
|
+
|
|
353
|
+
> def device_is_windows?
|
|
376
354
|
|
|
377
|
-
> def automation_name_is_xcuitest?
|
|
378
355
|
|
|
379
|
-
Return true if automationName is 'XCUITest'
|
|
380
356
|
|
|
381
357
|
__Returns:__
|
|
382
358
|
|
|
@@ -384,7 +360,7 @@ __Returns:__
|
|
|
384
360
|
|
|
385
361
|
--
|
|
386
362
|
|
|
387
|
-
##### [automation_name_is_uiautomator2?](https://github.com/appium/ruby_lib/blob/
|
|
363
|
+
##### [automation_name_is_uiautomator2?](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L251)
|
|
388
364
|
|
|
389
365
|
> def automation_name_is_uiautomator2?
|
|
390
366
|
|
|
@@ -396,7 +372,7 @@ __Returns:__
|
|
|
396
372
|
|
|
397
373
|
--
|
|
398
374
|
|
|
399
|
-
##### [automation_name_is_espresso?](https://github.com/appium/ruby_lib/blob/
|
|
375
|
+
##### [automation_name_is_espresso?](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L257)
|
|
400
376
|
|
|
401
377
|
> def automation_name_is_espresso?
|
|
402
378
|
|
|
@@ -408,7 +384,19 @@ __Returns:__
|
|
|
408
384
|
|
|
409
385
|
--
|
|
410
386
|
|
|
411
|
-
##### [
|
|
387
|
+
##### [automation_name_is_xcuitest?](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L263)
|
|
388
|
+
|
|
389
|
+
> def automation_name_is_xcuitest?
|
|
390
|
+
|
|
391
|
+
Return true if automationName is 'XCUITest'
|
|
392
|
+
|
|
393
|
+
__Returns:__
|
|
394
|
+
|
|
395
|
+
[Boolean]
|
|
396
|
+
|
|
397
|
+
--
|
|
398
|
+
|
|
399
|
+
##### [check_server_version_xcuitest](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L270)
|
|
412
400
|
|
|
413
401
|
> def check_server_version_xcuitest
|
|
414
402
|
|
|
@@ -421,7 +409,7 @@ __Returns:__
|
|
|
421
409
|
|
|
422
410
|
--
|
|
423
411
|
|
|
424
|
-
##### [appium_server_version](https://github.com/appium/ruby_lib/blob/
|
|
412
|
+
##### [appium_server_version](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L292)
|
|
425
413
|
|
|
426
414
|
> def appium_server_version
|
|
427
415
|
|
|
@@ -436,19 +424,25 @@ Returns the server's version info
|
|
|
436
424
|
}
|
|
437
425
|
```
|
|
438
426
|
|
|
439
|
-
|
|
427
|
+
__Returns:__
|
|
440
428
|
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
429
|
+
[Hash]
|
|
430
|
+
|
|
431
|
+
--
|
|
432
|
+
|
|
433
|
+
##### [platform_version](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L302)
|
|
434
|
+
|
|
435
|
+
> def platform_version
|
|
436
|
+
|
|
437
|
+
Return the platform version as an array of integers
|
|
444
438
|
|
|
445
439
|
__Returns:__
|
|
446
440
|
|
|
447
|
-
[
|
|
441
|
+
[Array<Integer>]
|
|
448
442
|
|
|
449
443
|
--
|
|
450
444
|
|
|
451
|
-
##### [appium_client_version](https://github.com/appium/ruby_lib/blob/
|
|
445
|
+
##### [appium_client_version](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L321)
|
|
452
446
|
|
|
453
447
|
> def appium_client_version
|
|
454
448
|
|
|
@@ -466,7 +460,7 @@ __Returns:__
|
|
|
466
460
|
|
|
467
461
|
--
|
|
468
462
|
|
|
469
|
-
##### [absolute_app_path](https://github.com/appium/ruby_lib/blob/
|
|
463
|
+
##### [absolute_app_path](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L333)
|
|
470
464
|
|
|
471
465
|
> def self.absolute_app_path(opts)
|
|
472
466
|
|
|
@@ -483,7 +477,7 @@ __Returns:__
|
|
|
483
477
|
|
|
484
478
|
--
|
|
485
479
|
|
|
486
|
-
##### [server_url](https://github.com/appium/ruby_lib/blob/
|
|
480
|
+
##### [server_url](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L366)
|
|
487
481
|
|
|
488
482
|
> def server_url
|
|
489
483
|
|
|
@@ -495,7 +489,7 @@ __Returns:__
|
|
|
495
489
|
|
|
496
490
|
--
|
|
497
491
|
|
|
498
|
-
##### [restart](https://github.com/appium/ruby_lib/blob/
|
|
492
|
+
##### [restart](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L374)
|
|
499
493
|
|
|
500
494
|
> def restart
|
|
501
495
|
|
|
@@ -507,7 +501,7 @@ __Returns:__
|
|
|
507
501
|
|
|
508
502
|
--
|
|
509
503
|
|
|
510
|
-
##### [screenshot](https://github.com/appium/ruby_lib/blob/
|
|
504
|
+
##### [screenshot](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L385)
|
|
511
505
|
|
|
512
506
|
> def screenshot(png_save_path)
|
|
513
507
|
|
|
@@ -525,7 +519,7 @@ __Returns:__
|
|
|
525
519
|
|
|
526
520
|
--
|
|
527
521
|
|
|
528
|
-
##### [driver_quit](https://github.com/appium/ruby_lib/blob/
|
|
522
|
+
##### [driver_quit](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L391)
|
|
529
523
|
|
|
530
524
|
> def driver_quit
|
|
531
525
|
|
|
@@ -537,12 +531,11 @@ __Returns:__
|
|
|
537
531
|
|
|
538
532
|
--
|
|
539
533
|
|
|
540
|
-
##### [quit_driver](https://github.com/appium/ruby_lib/blob/
|
|
534
|
+
##### [quit_driver](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L394)
|
|
541
535
|
|
|
542
536
|
> def driver_quit
|
|
543
537
|
|
|
544
538
|
Quits the driver
|
|
545
|
-
Alias for driver_quit
|
|
546
539
|
|
|
547
540
|
__Returns:__
|
|
548
541
|
|
|
@@ -550,7 +543,19 @@ __Returns:__
|
|
|
550
543
|
|
|
551
544
|
--
|
|
552
545
|
|
|
553
|
-
##### [
|
|
546
|
+
##### [window_size](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L403)
|
|
547
|
+
|
|
548
|
+
> def window_size
|
|
549
|
+
|
|
550
|
+
Get the device window's size.
|
|
551
|
+
|
|
552
|
+
__Returns:__
|
|
553
|
+
|
|
554
|
+
[Selenium::WebDriver::Dimension]
|
|
555
|
+
|
|
556
|
+
--
|
|
557
|
+
|
|
558
|
+
##### [start_driver](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L433)
|
|
554
559
|
|
|
555
560
|
> def start_driver(http_client_ops = { http_client: nil, open_timeout: 999_999, read_timeout: 999_999 })
|
|
556
561
|
|
|
@@ -567,7 +572,7 @@ __Returns:__
|
|
|
567
572
|
|
|
568
573
|
--
|
|
569
574
|
|
|
570
|
-
##### [set_implicit_wait](https://github.com/appium/ruby_lib/blob/
|
|
575
|
+
##### [set_implicit_wait](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L456)
|
|
571
576
|
|
|
572
577
|
> def set_implicit_wait(wait)
|
|
573
578
|
|
|
@@ -575,7 +580,7 @@ To ignore error for Espresso Driver
|
|
|
575
580
|
|
|
576
581
|
--
|
|
577
582
|
|
|
578
|
-
##### [no_wait](https://github.com/appium/ruby_lib/blob/
|
|
583
|
+
##### [no_wait](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L466)
|
|
579
584
|
|
|
580
585
|
> def no_wait
|
|
581
586
|
|
|
@@ -583,15 +588,15 @@ Set implicit wait to zero.
|
|
|
583
588
|
|
|
584
589
|
--
|
|
585
590
|
|
|
586
|
-
##### [set_wait](https://github.com/appium/ruby_lib/blob/
|
|
591
|
+
##### [set_wait](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L480)
|
|
587
592
|
|
|
588
593
|
> def set_wait(timeout = nil)
|
|
589
594
|
|
|
590
|
-
Set implicit wait. Default to @default_wait.
|
|
595
|
+
Set implicit wait. Default to @core.default_wait.
|
|
591
596
|
|
|
592
597
|
```ruby
|
|
593
598
|
set_wait 2
|
|
594
|
-
set_wait # @default_wait
|
|
599
|
+
set_wait # @core.default_wait
|
|
595
600
|
|
|
596
601
|
```
|
|
597
602
|
|
|
@@ -605,9 +610,9 @@ __Returns:__
|
|
|
605
610
|
|
|
606
611
|
--
|
|
607
612
|
|
|
608
|
-
##### [exists](https://github.com/appium/ruby_lib/blob/
|
|
613
|
+
##### [exists](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L497)
|
|
609
614
|
|
|
610
|
-
> def exists(pre_check = 0, post_check = @default_wait)
|
|
615
|
+
> def exists(pre_check = 0, post_check = @core.default_wait)
|
|
611
616
|
|
|
612
617
|
Returns existence of element.
|
|
613
618
|
|
|
@@ -629,7 +634,7 @@ __Returns:__
|
|
|
629
634
|
|
|
630
635
|
--
|
|
631
636
|
|
|
632
|
-
##### [execute_script](https://github.com/appium/ruby_lib/blob/
|
|
637
|
+
##### [execute_script](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L521)
|
|
633
638
|
|
|
634
639
|
> def execute_script(script, *args)
|
|
635
640
|
|
|
@@ -647,20 +652,14 @@ __Returns:__
|
|
|
647
652
|
|
|
648
653
|
--
|
|
649
654
|
|
|
650
|
-
##### [find_elements](https://github.com/appium/ruby_lib/blob/
|
|
655
|
+
##### [find_elements](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L545)
|
|
651
656
|
|
|
652
657
|
> def find_elements(*args)
|
|
653
658
|
|
|
654
659
|
Calls @driver.find_elements_with_appium
|
|
655
660
|
|
|
656
|
-
```
|
|
657
|
-
```
|
|
658
|
-
|
|
659
661
|
If you call `Appium.promote_appium_methods`, you can call `find_elements` directly.
|
|
660
662
|
|
|
661
|
-
```
|
|
662
|
-
```
|
|
663
|
-
|
|
664
663
|
If you call `Appium.promote_appium_methods`, you can call `find_elements` directly.
|
|
665
664
|
|
|
666
665
|
__Parameters:__
|
|
@@ -673,15 +672,12 @@ __Returns:__
|
|
|
673
672
|
|
|
674
673
|
--
|
|
675
674
|
|
|
676
|
-
##### [find_element](https://github.com/appium/ruby_lib/blob/
|
|
675
|
+
##### [find_element](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L561)
|
|
677
676
|
|
|
678
677
|
> def find_element(*args)
|
|
679
678
|
|
|
680
679
|
Calls @driver.find_element
|
|
681
680
|
|
|
682
|
-
```
|
|
683
|
-
```
|
|
684
|
-
|
|
685
681
|
If you call `Appium.promote_appium_methods`, you can call `find_element` directly.
|
|
686
682
|
|
|
687
683
|
__Parameters:__
|
|
@@ -694,7 +690,7 @@ __Returns:__
|
|
|
694
690
|
|
|
695
691
|
--
|
|
696
692
|
|
|
697
|
-
##### [set_location](https://github.com/appium/ruby_lib/blob/
|
|
693
|
+
##### [set_location](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L574)
|
|
698
694
|
|
|
699
695
|
> def set_location(opts = {})
|
|
700
696
|
|
|
@@ -710,7 +706,7 @@ __Returns:__
|
|
|
710
706
|
|
|
711
707
|
--
|
|
712
708
|
|
|
713
|
-
##### [x](https://github.com/appium/ruby_lib/blob/
|
|
709
|
+
##### [x](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/driver.rb#L584)
|
|
714
710
|
|
|
715
711
|
> def x
|
|
716
712
|
|
|
@@ -723,527 +719,390 @@ __Returns:__
|
|
|
723
719
|
|
|
724
720
|
--
|
|
725
721
|
|
|
726
|
-
##### [
|
|
727
|
-
|
|
728
|
-
> def write_session_id(session_id)
|
|
722
|
+
##### [username](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/sauce_labs.rb#L4)
|
|
729
723
|
|
|
724
|
+
> def username
|
|
730
725
|
|
|
726
|
+
Username for use on Sauce Labs. Set `false` to disable Sauce, even when SAUCE_USERNAME is in ENV.
|
|
731
727
|
|
|
732
728
|
--
|
|
733
729
|
|
|
734
|
-
##### [
|
|
730
|
+
##### [access_key](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/sauce_labs.rb#L6)
|
|
735
731
|
|
|
736
|
-
> def
|
|
732
|
+
> def access_key
|
|
737
733
|
|
|
738
|
-
|
|
739
|
-
Since @automation_name is set only client side before start_driver is called.
|
|
734
|
+
Access Key for use on Sauce Labs. Set `false` to disable Sauce, even when SAUCE_ACCESS_KEY is in ENV.
|
|
740
735
|
|
|
741
736
|
--
|
|
742
737
|
|
|
743
|
-
##### [
|
|
744
|
-
|
|
745
|
-
> def logger=(value)
|
|
738
|
+
##### [endpoint](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/sauce_labs.rb#L8)
|
|
746
739
|
|
|
747
|
-
|
|
740
|
+
> def endpoint
|
|
748
741
|
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
value - the value to set the attribute logger to.
|
|
742
|
+
Override the Sauce Appium endpoint to allow e.g. TestObject tests
|
|
752
743
|
|
|
753
744
|
--
|
|
754
745
|
|
|
755
|
-
##### [
|
|
746
|
+
##### [initialize](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/sauce_labs.rb#L10)
|
|
756
747
|
|
|
757
|
-
> def
|
|
748
|
+
> def initialize(appium_lib_opts)
|
|
758
749
|
|
|
759
750
|
|
|
760
751
|
|
|
761
|
-
|
|
752
|
+
__Returns:__
|
|
762
753
|
|
|
763
|
-
|
|
754
|
+
[SauceLabs] a new instance of SauceLabs
|
|
764
755
|
|
|
765
|
-
|
|
756
|
+
--
|
|
766
757
|
|
|
758
|
+
##### [sauce_server_url?](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/sauce_labs.rb#L21)
|
|
767
759
|
|
|
760
|
+
> def sauce_server_url?
|
|
768
761
|
|
|
769
|
-
__Parameters:__
|
|
770
762
|
|
|
771
|
-
[Hash] opts_caps - Capabilities for Appium server. All capability keys are converted to lowerCamelCase when
|
|
772
|
-
this client sends capabilities to Appium server as JSON format.
|
|
773
763
|
|
|
774
764
|
__Returns:__
|
|
775
765
|
|
|
776
|
-
[
|
|
777
|
-
inherited ::Selenium::WebDriver::Remote::W3C::Capabilities
|
|
766
|
+
[Boolean]
|
|
778
767
|
|
|
779
768
|
--
|
|
780
769
|
|
|
781
|
-
##### [
|
|
770
|
+
##### [server_url](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/sauce_labs.rb#L25)
|
|
782
771
|
|
|
783
|
-
> def
|
|
772
|
+
> def server_url
|
|
784
773
|
|
|
785
|
-
Return the hash of all localization strings.
|
|
786
|
-
```ruby
|
|
787
|
-
app_strings #=> "TransitionsTitle"=>"Transitions", "WebTitle"=>"Web"
|
|
788
|
-
```
|
|
789
774
|
|
|
790
|
-
--
|
|
791
775
|
|
|
792
|
-
|
|
776
|
+
--
|
|
793
777
|
|
|
794
|
-
|
|
778
|
+
##### [get_log](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/log.rb#L10)
|
|
795
779
|
|
|
796
|
-
|
|
797
|
-
This is a blocking application
|
|
780
|
+
> def get_log(type)
|
|
798
781
|
|
|
799
|
-
--
|
|
800
782
|
|
|
801
|
-
##### [current_activity](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/device.rb#L24)
|
|
802
783
|
|
|
803
|
-
|
|
784
|
+
__Parameters:__
|
|
804
785
|
|
|
805
|
-
|
|
806
|
-
```ruby
|
|
807
|
-
current_activity # '.ApiDemos'
|
|
808
|
-
```
|
|
786
|
+
[String|Hash] type - You can get particular type's logs.
|
|
809
787
|
|
|
810
788
|
__Returns:__
|
|
811
789
|
|
|
812
|
-
[
|
|
790
|
+
[[Selenium::WebDriver::LogEntry]] A list of logs data.
|
|
813
791
|
|
|
814
792
|
--
|
|
815
793
|
|
|
816
|
-
##### [
|
|
794
|
+
##### [get_available_log_types](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/log.rb#L20)
|
|
817
795
|
|
|
818
|
-
> def
|
|
796
|
+
> def get_available_log_types
|
|
819
797
|
|
|
820
|
-
Get
|
|
821
|
-
```ruby
|
|
822
|
-
current_package # 'com.example.android.apis'
|
|
823
|
-
```
|
|
798
|
+
Get a list of available log types
|
|
824
799
|
|
|
825
800
|
__Returns:__
|
|
826
801
|
|
|
827
|
-
[String] A
|
|
802
|
+
[[String]] A list of available log types.
|
|
828
803
|
|
|
829
804
|
--
|
|
830
805
|
|
|
831
|
-
##### [
|
|
806
|
+
##### [initialize](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/wait.rb#L6)
|
|
807
|
+
|
|
808
|
+
> def initialize(opts = {})
|
|
832
809
|
|
|
833
|
-
> def get_system_bars
|
|
834
810
|
|
|
835
|
-
Get system bar's information
|
|
836
|
-
```ruby
|
|
837
|
-
get_system_bars
|
|
838
|
-
```
|
|
839
811
|
|
|
840
812
|
__Returns:__
|
|
841
813
|
|
|
842
|
-
[
|
|
814
|
+
[Wait] a new instance of Wait
|
|
843
815
|
|
|
844
816
|
--
|
|
845
817
|
|
|
846
|
-
##### [
|
|
818
|
+
##### [wait_true](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/wait.rb#L34)
|
|
847
819
|
|
|
848
|
-
> def
|
|
820
|
+
> def wait_true(opts = {})
|
|
849
821
|
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
822
|
+
Check every interval seconds to see if yield returns a truthy value.
|
|
823
|
+
Note this isn't a strict boolean true, any truthy value is accepted.
|
|
824
|
+
false and nil are considered failures.
|
|
825
|
+
Give up after timeout seconds.
|
|
854
826
|
|
|
855
|
-
|
|
827
|
+
Wait code from the selenium Ruby gem
|
|
828
|
+
https://github.com/SeleniumHQ/selenium/blob/cf501dda3f0ed12233de51ce8170c0e8090f0c20/rb/lib/selenium/webdriver/common/wait.rb
|
|
856
829
|
|
|
857
|
-
|
|
830
|
+
If only a number is provided then it's treated as the timeout value.
|
|
858
831
|
|
|
859
|
-
|
|
832
|
+
__Parameters:__
|
|
860
833
|
|
|
861
|
-
|
|
834
|
+
[Hash] opts - Options
|
|
862
835
|
|
|
863
|
-
|
|
836
|
+
--
|
|
864
837
|
|
|
865
|
-
|
|
866
|
-
```ruby
|
|
867
|
-
is_keyboard_shown # false
|
|
868
|
-
```
|
|
838
|
+
##### [wait](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/wait.rb#L57)
|
|
869
839
|
|
|
870
|
-
|
|
840
|
+
> def wait(opts = {})
|
|
871
841
|
|
|
872
|
-
|
|
842
|
+
Check every interval seconds to see if yield doesn't raise an exception.
|
|
843
|
+
Give up after timeout seconds.
|
|
873
844
|
|
|
874
|
-
|
|
845
|
+
Wait code from the selenium Ruby gem
|
|
846
|
+
https://github.com/SeleniumHQ/selenium/blob/cf501dda3f0ed12233de51ce8170c0e8090f0c20/rb/lib/selenium/webdriver/common/wait.rb
|
|
875
847
|
|
|
876
|
-
|
|
848
|
+
If only a number is provided then it's treated as the timeout value.
|
|
877
849
|
|
|
878
|
-
|
|
850
|
+
__Parameters:__
|
|
879
851
|
|
|
880
|
-
|
|
852
|
+
[Hash] opts - Options
|
|
881
853
|
|
|
882
854
|
--
|
|
883
855
|
|
|
884
|
-
##### [
|
|
856
|
+
##### [ignore](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/helper.rb#L17)
|
|
885
857
|
|
|
886
|
-
> def
|
|
858
|
+
> def ignore
|
|
887
859
|
|
|
888
|
-
|
|
860
|
+
Return yield and ignore any exceptions.
|
|
889
861
|
|
|
890
862
|
--
|
|
891
863
|
|
|
892
|
-
##### [
|
|
893
|
-
|
|
894
|
-
> def shake
|
|
895
|
-
|
|
896
|
-
Cause the device to shake
|
|
864
|
+
##### [back](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/helper.rb#L24)
|
|
897
865
|
|
|
898
|
-
|
|
866
|
+
> def back
|
|
899
867
|
|
|
900
|
-
|
|
868
|
+
Navigate back.
|
|
901
869
|
|
|
902
|
-
|
|
870
|
+
__Returns:__
|
|
903
871
|
|
|
904
|
-
|
|
872
|
+
[void]
|
|
905
873
|
|
|
906
874
|
--
|
|
907
875
|
|
|
908
|
-
##### [
|
|
909
|
-
|
|
910
|
-
> def device_locked?
|
|
876
|
+
##### [session_id](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/helper.rb#L29)
|
|
911
877
|
|
|
878
|
+
> def session_id
|
|
912
879
|
|
|
880
|
+
For Sauce Labs reporting. Returns the current session id.
|
|
913
881
|
|
|
914
882
|
--
|
|
915
883
|
|
|
916
|
-
##### [
|
|
884
|
+
##### [xpath](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/helper.rb#L37)
|
|
917
885
|
|
|
918
|
-
> def
|
|
886
|
+
> def xpath(xpath_str)
|
|
919
887
|
|
|
920
|
-
|
|
888
|
+
Returns the first element that matches the provided xpath.
|
|
921
889
|
|
|
922
890
|
__Parameters:__
|
|
923
891
|
|
|
924
|
-
[String]
|
|
925
|
-
|
|
892
|
+
[String] xpath_str - the XPath string
|
|
893
|
+
|
|
894
|
+
__Returns:__
|
|
926
895
|
|
|
927
|
-
[
|
|
928
|
-
XCUITest ignore this argument.
|
|
929
|
-
Default for iOS is `:pressKey`. Default for Android is `:tapOutside`.
|
|
896
|
+
[Element]
|
|
930
897
|
|
|
931
898
|
--
|
|
932
899
|
|
|
933
|
-
##### [
|
|
900
|
+
##### [xpaths](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/helper.rb#L45)
|
|
934
901
|
|
|
935
|
-
> def
|
|
902
|
+
> def xpaths(xpath_str)
|
|
936
903
|
|
|
937
|
-
|
|
938
|
-
http://developer.android.com/reference/android/view/KeyEvent.html
|
|
904
|
+
Returns all elements that match the provided xpath.
|
|
939
905
|
|
|
940
906
|
__Parameters:__
|
|
941
907
|
|
|
942
|
-
[
|
|
943
|
-
|
|
944
|
-
[String] metastate - The state the metakeys should be in when pressing the key.
|
|
945
|
-
|
|
946
|
-
--
|
|
908
|
+
[String] xpath_str - the XPath string
|
|
947
909
|
|
|
948
|
-
|
|
910
|
+
__Returns:__
|
|
949
911
|
|
|
950
|
-
>
|
|
912
|
+
[Array<Element>]
|
|
951
913
|
|
|
952
|
-
|
|
953
|
-
http://developer.android.com/reference/android/view/KeyEvent.html
|
|
914
|
+
--
|
|
954
915
|
|
|
955
|
-
|
|
916
|
+
##### [result](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/helper.rb#L56)
|
|
956
917
|
|
|
957
|
-
|
|
918
|
+
> def result
|
|
958
919
|
|
|
959
|
-
|
|
920
|
+
Returns the value of attribute result
|
|
960
921
|
|
|
961
922
|
--
|
|
962
923
|
|
|
963
|
-
##### [
|
|
924
|
+
##### [initialize](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/helper.rb#L58)
|
|
964
925
|
|
|
965
|
-
> def
|
|
926
|
+
> def initialize
|
|
966
927
|
|
|
967
|
-
Place a file in a specific location on the device.
|
|
968
928
|
|
|
969
|
-
__Parameters:__
|
|
970
929
|
|
|
971
|
-
|
|
930
|
+
__Returns:__
|
|
972
931
|
|
|
973
|
-
[
|
|
932
|
+
[CountElements] a new instance of CountElements
|
|
974
933
|
|
|
975
934
|
--
|
|
976
935
|
|
|
977
|
-
##### [
|
|
936
|
+
##### [reset](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/helper.rb#L62)
|
|
978
937
|
|
|
979
|
-
> def
|
|
980
|
-
|
|
981
|
-
Retrieve a file from the device. This can retrieve an absolute path or
|
|
982
|
-
a path relative to the installed app (iOS only).
|
|
983
|
-
```ruby
|
|
984
|
-
pull_file '/local/data/some/path' #=> Get the file at that path
|
|
985
|
-
pull_file 'Shenanigans.app/some/file' #=> Get 'some/file' from the install location of Shenanigans.app
|
|
986
|
-
```
|
|
938
|
+
> def reset
|
|
987
939
|
|
|
988
|
-
__Parameters:__
|
|
989
940
|
|
|
990
|
-
[String] path - Either an absolute path OR, for iOS devices, a path relative to the app, as described.
|
|
991
941
|
|
|
992
942
|
--
|
|
993
943
|
|
|
994
|
-
##### [
|
|
995
|
-
|
|
996
|
-
> def pull_folder
|
|
944
|
+
##### [start_element](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/helper.rb#L67)
|
|
997
945
|
|
|
998
|
-
|
|
999
|
-
```ruby
|
|
1000
|
-
pull_folder '/data/local/tmp' #=> Get the folder at that path
|
|
1001
|
-
```
|
|
1002
|
-
|
|
1003
|
-
__Parameters:__
|
|
946
|
+
> def start_element(name, attrs = [], driver = $driver)
|
|
1004
947
|
|
|
1005
|
-
|
|
948
|
+
http://nokogiri.org/Nokogiri/XML/SAX/Document.html
|
|
1006
949
|
|
|
1007
950
|
--
|
|
1008
951
|
|
|
1009
|
-
##### [
|
|
952
|
+
##### [formatted_result](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/helper.rb#L73)
|
|
1010
953
|
|
|
1011
|
-
> def
|
|
1012
|
-
|
|
1013
|
-
iOS only; Simulate Touch ID with either valid (match == true) or invalid (match == false) fingerprint.
|
|
1014
|
-
```ruby
|
|
1015
|
-
touch_id true #=> Simulate valid fingerprint
|
|
1016
|
-
touch_id false #=> Simulate invalid fingerprint
|
|
1017
|
-
```
|
|
954
|
+
> def formatted_result
|
|
1018
955
|
|
|
1019
|
-
__Parameters:__
|
|
1020
956
|
|
|
1021
|
-
[Boolean] match - fingerprint validity
|
|
1022
|
-
Defaults to true.
|
|
1023
957
|
|
|
1024
958
|
--
|
|
1025
959
|
|
|
1026
|
-
##### [
|
|
960
|
+
##### [get_page_class](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/helper.rb#L84)
|
|
1027
961
|
|
|
1028
|
-
> def
|
|
962
|
+
> def get_page_class
|
|
1029
963
|
|
|
1030
|
-
|
|
964
|
+
Returns a string of class counts of visible elements.
|
|
1031
965
|
|
|
1032
966
|
--
|
|
1033
967
|
|
|
1034
|
-
##### [
|
|
1035
|
-
|
|
1036
|
-
> def end_coverage
|
|
1037
|
-
|
|
1038
|
-
Android only; Ends the test coverage and writes the results to the given path on device.
|
|
1039
|
-
|
|
1040
|
-
__Parameters:__
|
|
968
|
+
##### [page_class](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/helper.rb#L95)
|
|
1041
969
|
|
|
1042
|
-
|
|
970
|
+
> def page_class
|
|
1043
971
|
|
|
1044
|
-
|
|
972
|
+
Count all classes on screen and print to stdout.
|
|
973
|
+
Useful for appium_console.
|
|
1045
974
|
|
|
1046
975
|
--
|
|
1047
976
|
|
|
1048
|
-
##### [
|
|
977
|
+
##### [px_to_window_rel](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/helper.rb#L105)
|
|
1049
978
|
|
|
1050
|
-
> def
|
|
979
|
+
> def px_to_window_rel(opts = {}, driver = $driver)
|
|
980
|
+
|
|
981
|
+
Converts pixel values to window relative values
|
|
1051
982
|
|
|
1052
|
-
|
|
983
|
+
```ruby
|
|
984
|
+
px_to_window_rel x: 50, y: 150
|
|
985
|
+
```
|
|
1053
986
|
|
|
1054
987
|
--
|
|
1055
988
|
|
|
1056
|
-
##### [
|
|
989
|
+
##### [xml_keys](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/helper.rb#L124)
|
|
1057
990
|
|
|
1058
|
-
> def
|
|
991
|
+
> def xml_keys(target)
|
|
1059
992
|
|
|
1060
|
-
|
|
993
|
+
Search strings.xml's values for target.
|
|
1061
994
|
|
|
1062
995
|
__Parameters:__
|
|
1063
996
|
|
|
1064
|
-
[
|
|
997
|
+
[String] target - the target to search for in strings.xml values
|
|
998
|
+
|
|
999
|
+
__Returns:__
|
|
1000
|
+
|
|
1001
|
+
[Array]
|
|
1065
1002
|
|
|
1066
1003
|
--
|
|
1067
1004
|
|
|
1068
|
-
##### [
|
|
1005
|
+
##### [xml_values](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/helper.rb#L132)
|
|
1069
1006
|
|
|
1070
|
-
> def
|
|
1007
|
+
> def xml_values(target)
|
|
1071
1008
|
|
|
1072
|
-
|
|
1009
|
+
Search strings.xml's keys for target.
|
|
1073
1010
|
|
|
1074
|
-
|
|
1075
|
-
```ruby
|
|
1076
|
-
start_activity app_package: 'io.appium.android.apis',
|
|
1077
|
-
app_activity: '.accessibility.AccessibilityNodeProviderActivity'
|
|
1078
|
-
```
|
|
1079
|
-
|
|
1080
|
-
--
|
|
1011
|
+
__Parameters:__
|
|
1081
1012
|
|
|
1082
|
-
|
|
1013
|
+
[String] target - the target to search for in strings.xml keys
|
|
1083
1014
|
|
|
1084
|
-
|
|
1015
|
+
__Returns:__
|
|
1085
1016
|
|
|
1086
|
-
|
|
1087
|
-
See set_network_connection method for return value
|
|
1017
|
+
[Array]
|
|
1088
1018
|
|
|
1089
1019
|
--
|
|
1090
1020
|
|
|
1091
|
-
##### [
|
|
1021
|
+
##### [resolve_id](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/helper.rb#L140)
|
|
1092
1022
|
|
|
1093
|
-
> def
|
|
1023
|
+
> def resolve_id(id)
|
|
1094
1024
|
|
|
1095
|
-
|
|
1096
|
-
Value (Alias) | Data | Wifi | Airplane Mode
|
|
1097
|
-
-------------------------------------------------
|
|
1098
|
-
1 (Airplane Mode) | 0 | 0 | 1
|
|
1099
|
-
6 (All network on) | 1 | 1 | 0
|
|
1100
|
-
4 (Data only) | 1 | 0 | 0
|
|
1101
|
-
2 (Wifi only) | 0 | 1 | 0
|
|
1102
|
-
0 (None) | 0 | 0 | 0
|
|
1025
|
+
Resolve id in strings.xml and return the value.
|
|
1103
1026
|
|
|
1104
1027
|
__Parameters:__
|
|
1105
1028
|
|
|
1106
|
-
[String]
|
|
1107
|
-
|
|
1108
|
-
--
|
|
1109
|
-
|
|
1110
|
-
##### [set_immediate_value](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/device.rb#L181)
|
|
1111
|
-
|
|
1112
|
-
> def set_immediate_value
|
|
1113
|
-
|
|
1114
|
-
Set the value to element directly
|
|
1115
|
-
for iOS; setValue is called in XCUITest instead because XCUITest doesn't provide set value directly.
|
|
1116
|
-
https://github.com/appium/appium-xcuitest-driver/blob/793cdc7d5e84bd553e375076e1c6dc7e242c9cde/lib/commands/element.js#L123
|
|
1117
|
-
|
|
1118
|
-
```ruby
|
|
1119
|
-
set_immediate_value element, 'hello'
|
|
1120
|
-
```
|
|
1121
|
-
|
|
1122
|
-
--
|
|
1123
|
-
|
|
1124
|
-
##### [get_performance_data_types](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/device.rb#L190)
|
|
1125
|
-
|
|
1126
|
-
> def get_performance_data_types
|
|
1029
|
+
[String] id - the id to resolve
|
|
1127
1030
|
|
|
1128
|
-
|
|
1129
|
-
cpu, memory, network, battery via adb commands.
|
|
1130
|
-
https://github.com/appium/appium-base-driver/blob/be29aec2318316d12b5c3295e924a5ba8f09b0fb/lib/mjsonwp/routes.js#L300
|
|
1031
|
+
__Returns:__
|
|
1131
1032
|
|
|
1132
|
-
|
|
1133
|
-
get_performance_data_types #=> ["cpuinfo", "batteryinfo", "networkinfo", "memoryinfo"]
|
|
1134
|
-
```
|
|
1033
|
+
[String]
|
|
1135
1034
|
|
|
1136
1035
|
--
|
|
1137
1036
|
|
|
1138
|
-
##### [
|
|
1139
|
-
|
|
1140
|
-
> def extend_search_contexts
|
|
1037
|
+
##### [filter](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/helper.rb#L146)
|
|
1141
1038
|
|
|
1039
|
+
> def filter
|
|
1142
1040
|
|
|
1041
|
+
Returns the value of attribute filter
|
|
1143
1042
|
|
|
1144
1043
|
--
|
|
1145
1044
|
|
|
1146
|
-
##### [
|
|
1147
|
-
|
|
1148
|
-
> def find_element_with_appium
|
|
1045
|
+
##### [filter=](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/helper.rb#L149)
|
|
1149
1046
|
|
|
1047
|
+
> def filter=(value)
|
|
1150
1048
|
|
|
1049
|
+
convert to string to support symbols
|
|
1151
1050
|
|
|
1152
1051
|
--
|
|
1153
1052
|
|
|
1154
|
-
##### [
|
|
1155
|
-
|
|
1156
|
-
> def find_elements_with_appium
|
|
1157
|
-
|
|
1158
|
-
find_element/s_with_appium with their accessibility_id
|
|
1053
|
+
##### [initialize](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/helper.rb#L155)
|
|
1159
1054
|
|
|
1160
|
-
|
|
1161
|
-
find_elements :accessibility_id, 'Animation'
|
|
1162
|
-
```
|
|
1163
|
-
|
|
1164
|
-
--
|
|
1055
|
+
> def initialize
|
|
1165
1056
|
|
|
1166
|
-
##### [add_touch_actions](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/device.rb#L474)
|
|
1167
1057
|
|
|
1168
|
-
> def add_touch_actions
|
|
1169
1058
|
|
|
1059
|
+
__Returns:__
|
|
1170
1060
|
|
|
1061
|
+
[HTMLElements] a new instance of HTMLElements
|
|
1171
1062
|
|
|
1172
1063
|
--
|
|
1173
1064
|
|
|
1174
|
-
##### [
|
|
1065
|
+
##### [reset](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/helper.rb#L160)
|
|
1175
1066
|
|
|
1176
|
-
> def
|
|
1067
|
+
> def reset
|
|
1177
1068
|
|
|
1178
1069
|
|
|
1179
1070
|
|
|
1180
1071
|
--
|
|
1181
1072
|
|
|
1182
|
-
##### [
|
|
1073
|
+
##### [result](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/helper.rb#L166)
|
|
1183
1074
|
|
|
1184
|
-
> def
|
|
1075
|
+
> def result
|
|
1185
1076
|
|
|
1186
|
-
Change the context to the given context.
|
|
1187
|
-
```ruby
|
|
1188
|
-
set_context "NATIVE_APP"
|
|
1189
|
-
```
|
|
1190
1077
|
|
|
1191
|
-
__Parameters:__
|
|
1192
|
-
|
|
1193
|
-
[String] The - context to change to
|
|
1194
1078
|
|
|
1195
1079
|
--
|
|
1196
1080
|
|
|
1197
|
-
##### [
|
|
1198
|
-
|
|
1199
|
-
> def current_context
|
|
1200
|
-
|
|
1081
|
+
##### [start_element](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/helper.rb#L182)
|
|
1201
1082
|
|
|
1083
|
+
> def start_element(name, attrs = [])
|
|
1202
1084
|
|
|
1203
|
-
__Returns:__
|
|
1204
1085
|
|
|
1205
|
-
[String] The context currently being used.
|
|
1206
1086
|
|
|
1207
1087
|
--
|
|
1208
1088
|
|
|
1209
|
-
##### [
|
|
1210
|
-
|
|
1211
|
-
> def available_contexts
|
|
1089
|
+
##### [end_element](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/helper.rb#L191)
|
|
1212
1090
|
|
|
1091
|
+
> def end_element(name)
|
|
1213
1092
|
|
|
1214
1093
|
|
|
1215
|
-
__Returns:__
|
|
1216
|
-
|
|
1217
|
-
[Array<String>] All usable contexts, as an array of strings.
|
|
1218
1094
|
|
|
1219
1095
|
--
|
|
1220
1096
|
|
|
1221
|
-
##### [
|
|
1222
|
-
|
|
1223
|
-
> def within_context(context)
|
|
1224
|
-
|
|
1225
|
-
Perform a block within the given context, then switch back to the starting context.
|
|
1226
|
-
```ruby
|
|
1227
|
-
result = within_context('NATIVE_APP') do
|
|
1228
|
-
find_element :tag, "button"
|
|
1229
|
-
end # The result of `find_element :tag, "button"`
|
|
1230
|
-
```
|
|
1231
|
-
|
|
1232
|
-
__Parameters:__
|
|
1097
|
+
##### [characters](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/helper.rb#L197)
|
|
1233
1098
|
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
--
|
|
1237
|
-
|
|
1238
|
-
##### [switch_to_default_context](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/device.rb#L607)
|
|
1099
|
+
> def characters(chars)
|
|
1239
1100
|
|
|
1240
|
-
> def switch_to_default_context
|
|
1241
1101
|
|
|
1242
|
-
Change to the default context. This is equivalent to `set_context nil`.
|
|
1243
1102
|
|
|
1244
1103
|
--
|
|
1245
1104
|
|
|
1246
|
-
##### [pinch](https://github.com/appium/ruby_lib/blob/
|
|
1105
|
+
##### [pinch](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/multi_touch.rb#L53)
|
|
1247
1106
|
|
|
1248
1107
|
> def pinch(percentage = 25, auto_perform = true, driver = $driver)
|
|
1249
1108
|
|
|
@@ -1277,7 +1136,7 @@ __Parameters:__
|
|
|
1277
1136
|
|
|
1278
1137
|
--
|
|
1279
1138
|
|
|
1280
|
-
##### [zoom](https://github.com/appium/ruby_lib/blob/
|
|
1139
|
+
##### [zoom](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/multi_touch.rb#L80)
|
|
1281
1140
|
|
|
1282
1141
|
> def zoom(percentage = 200, auto_perform = true, driver = $driver)
|
|
1283
1142
|
|
|
@@ -1287,697 +1146,169 @@ Places two fingers at the edges of the screen and brings them together.
|
|
|
1287
1146
|
action = zoom 200 #=> Zoom in the screen from the center until it doubles in size.
|
|
1288
1147
|
```
|
|
1289
1148
|
|
|
1290
|
-
Without auto_perform
|
|
1291
|
-
|
|
1292
|
-
```ruby
|
|
1293
|
-
action = zoom 200, false #=> Zoom in the screen from the center until it doubles in size.
|
|
1294
|
-
action.perform #=> to 25% of its size.
|
|
1295
|
-
```
|
|
1296
|
-
|
|
1297
|
-
With driver
|
|
1298
|
-
|
|
1299
|
-
```ruby
|
|
1300
|
-
driver = Appium::Driver.new(opts, false).start_driver
|
|
1301
|
-
pinch 200, true, driver #=> Zoom in the screen from the center until it doubles in size.
|
|
1302
|
-
```
|
|
1303
|
-
|
|
1304
|
-
__Parameters:__
|
|
1305
|
-
|
|
1306
|
-
[int] percentage - The percent size by which to shrink the screen when pinched.
|
|
1307
|
-
|
|
1308
|
-
[boolean] auto_perform - Whether to perform the action immediately (default true)
|
|
1309
|
-
|
|
1310
|
-
[Driver] driver - Set a driver to conduct the action. DEfault is global driver($driver)
|
|
1311
|
-
|
|
1312
|
-
--
|
|
1313
|
-
|
|
1314
|
-
##### [pinch_for_xcuitest](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/multi_touch.rb#L118)
|
|
1315
|
-
|
|
1316
|
-
> def pinch_for_xcuitest(rate, driver)
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
--
|
|
1321
|
-
|
|
1322
|
-
##### [pinch_android](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/multi_touch.rb#L133)
|
|
1323
|
-
|
|
1324
|
-
> def pinch_android(rate)
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
--
|
|
1329
|
-
|
|
1330
|
-
##### [pinch_ios](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/multi_touch.rb#L147)
|
|
1331
|
-
|
|
1332
|
-
> def pinch_ios(rate)
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
--
|
|
1337
|
-
|
|
1338
|
-
##### [zoom_for_xcuitest](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/multi_touch.rb#L161)
|
|
1339
|
-
|
|
1340
|
-
> def zoom_for_xcuitest(rate, driver)
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
--
|
|
1345
|
-
|
|
1346
|
-
##### [zoom_android](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/multi_touch.rb#L176)
|
|
1347
|
-
|
|
1348
|
-
> def zoom_android(rate)
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
--
|
|
1353
|
-
|
|
1354
|
-
##### [zoom_ios](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/multi_touch.rb#L190)
|
|
1355
|
-
|
|
1356
|
-
> def zoom_ios(rate)
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
--
|
|
1361
|
-
|
|
1362
|
-
##### [actions](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/multi_touch.rb#L205)
|
|
1363
|
-
|
|
1364
|
-
> def actions
|
|
1365
|
-
|
|
1366
|
-
self
|
|
1367
|
-
|
|
1368
|
-
--
|
|
1369
|
-
|
|
1370
|
-
##### [driver](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/multi_touch.rb#L205)
|
|
1371
|
-
|
|
1372
|
-
> def driver
|
|
1373
|
-
|
|
1374
|
-
self
|
|
1375
|
-
|
|
1376
|
-
--
|
|
1377
|
-
|
|
1378
|
-
##### [initialize](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/multi_touch.rb#L208)
|
|
1379
|
-
|
|
1380
|
-
> def initialize(driver = $driver)
|
|
1381
|
-
|
|
1382
|
-
Create a new multi-action with Driver
|
|
1383
|
-
|
|
1384
|
-
__Returns:__
|
|
1385
|
-
|
|
1386
|
-
[MultiTouch] a new instance of MultiTouch
|
|
1387
|
-
|
|
1388
|
-
--
|
|
1389
|
-
|
|
1390
|
-
##### [add](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/multi_touch.rb#L215)
|
|
1391
|
-
|
|
1392
|
-
> def add(chain)
|
|
1393
|
-
|
|
1394
|
-
Add a touch_action to be performed
|
|
1395
|
-
|
|
1396
|
-
__Parameters:__
|
|
1397
|
-
|
|
1398
|
-
[TouchAction] chain - The action to add to the chain
|
|
1399
|
-
|
|
1400
|
-
--
|
|
1401
|
-
|
|
1402
|
-
##### [perform](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/multi_touch.rb#L220)
|
|
1403
|
-
|
|
1404
|
-
> def perform
|
|
1405
|
-
|
|
1406
|
-
Ask Appium to perform the actions
|
|
1407
|
-
|
|
1408
|
-
--
|
|
1409
|
-
|
|
1410
|
-
##### [ACTIONS](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/touch_actions.rb#L30)
|
|
1411
|
-
|
|
1412
|
-
> ACTIONS = [:move_to, :long_press, :double_tap, :two_finger_tap, :press, :release, :tap, :wait, :perform].freeze
|
|
1413
|
-
|
|
1414
|
-
|
|
1415
|
-
|
|
1416
|
-
--
|
|
1417
|
-
|
|
1418
|
-
##### [COMPLEX_ACTIONS](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/touch_actions.rb#L31)
|
|
1419
|
-
|
|
1420
|
-
> COMPLEX_ACTIONS = [:swipe].freeze
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
--
|
|
1425
|
-
|
|
1426
|
-
##### [actions](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/touch_actions.rb#L45)
|
|
1427
|
-
|
|
1428
|
-
> def actions
|
|
1429
|
-
|
|
1430
|
-
Returns the value of attribute actions
|
|
1431
|
-
|
|
1432
|
-
--
|
|
1433
|
-
|
|
1434
|
-
##### [initialize](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/touch_actions.rb#L47)
|
|
1435
|
-
|
|
1436
|
-
> def initialize
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
__Returns:__
|
|
1441
|
-
|
|
1442
|
-
[TouchAction] a new instance of TouchAction
|
|
1443
|
-
|
|
1444
|
-
--
|
|
1445
|
-
|
|
1446
|
-
##### [move_to](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/touch_actions.rb#L58)
|
|
1447
|
-
|
|
1448
|
-
> def move_to(opts)
|
|
1449
|
-
|
|
1450
|
-
Move to the given co-ordinates.
|
|
1451
|
-
|
|
1452
|
-
`move_to`'s `x` and `y` have two case. One is working as coordinate, the other is working as offset.
|
|
1453
|
-
|
|
1454
|
-
__Parameters:__
|
|
1455
|
-
|
|
1456
|
-
[Hash] opts - a customizable set of options
|
|
1457
|
-
|
|
1458
|
-
--
|
|
1459
|
-
|
|
1460
|
-
##### [long_press](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/touch_actions.rb#L72)
|
|
1461
|
-
|
|
1462
|
-
> def long_press(opts)
|
|
1463
|
-
|
|
1464
|
-
Press down for a specific duration.
|
|
1465
|
-
Alternatively, you can use `press(...).wait(...).release()` instead of `long_press` if duration doesn't work well.
|
|
1466
|
-
https://github.com/appium/ruby_lib/issues/231#issuecomment-269895512
|
|
1467
|
-
e.g. Appium::TouchAction.new.press(x: 280, y: 530).wait(2000).release.perform
|
|
1468
|
-
|
|
1469
|
-
__Parameters:__
|
|
1470
|
-
|
|
1471
|
-
[Hash] element - a customizable set of options
|
|
1472
|
-
|
|
1473
|
-
[Hash] x - a customizable set of options
|
|
1474
|
-
|
|
1475
|
-
[Hash] y - a customizable set of options
|
|
1476
|
-
|
|
1477
|
-
[Hash] duration - a customizable set of options
|
|
1478
|
-
|
|
1479
|
-
--
|
|
1480
|
-
|
|
1481
|
-
##### [press](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/touch_actions.rb#L84)
|
|
1482
|
-
|
|
1483
|
-
> def press(opts)
|
|
1484
|
-
|
|
1485
|
-
Press a finger onto the screen. Finger will stay down until you call
|
|
1486
|
-
`release`.
|
|
1487
|
-
|
|
1488
|
-
__Parameters:__
|
|
1489
|
-
|
|
1490
|
-
[Hash] opts - a customizable set of options
|
|
1491
|
-
|
|
1492
|
-
--
|
|
1493
|
-
|
|
1494
|
-
##### [release](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/touch_actions.rb#L95)
|
|
1495
|
-
|
|
1496
|
-
> def release(opts = nil)
|
|
1497
|
-
|
|
1498
|
-
Remove a finger from the screen.
|
|
1499
|
-
|
|
1500
|
-
__Parameters:__
|
|
1501
|
-
|
|
1502
|
-
[Hash] opts - a customizable set of options
|
|
1503
|
-
|
|
1504
|
-
--
|
|
1505
|
-
|
|
1506
|
-
##### [tap](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/touch_actions.rb#L107)
|
|
1507
|
-
|
|
1508
|
-
> def tap(opts)
|
|
1509
|
-
|
|
1510
|
-
Touch a point on the screen.
|
|
1511
|
-
Alternatively, you can use `press(...).release.perform` instead of `tap(...).perform`.
|
|
1512
|
-
|
|
1513
|
-
__Parameters:__
|
|
1514
|
-
|
|
1515
|
-
[Hash] opts - a customizable set of options
|
|
1516
|
-
|
|
1517
|
-
--
|
|
1518
|
-
|
|
1519
|
-
##### [double_tap](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/touch_actions.rb#L120)
|
|
1520
|
-
|
|
1521
|
-
> def double_tap(opts)
|
|
1522
|
-
|
|
1523
|
-
Double tap an element on the screen
|
|
1524
|
-
|
|
1525
|
-
__Parameters:__
|
|
1526
|
-
|
|
1527
|
-
[Hash] opts - a customizable set of options
|
|
1528
|
-
|
|
1529
|
-
--
|
|
1530
|
-
|
|
1531
|
-
##### [two_finger_tap](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/touch_actions.rb#L131)
|
|
1532
|
-
|
|
1533
|
-
> def two_finger_tap(opts)
|
|
1534
|
-
|
|
1535
|
-
Two finger tap an element on the screen
|
|
1536
|
-
|
|
1537
|
-
__Parameters:__
|
|
1538
|
-
|
|
1539
|
-
[Hash] opts - a customizable set of options
|
|
1540
|
-
|
|
1541
|
-
--
|
|
1542
|
-
|
|
1543
|
-
##### [wait](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/touch_actions.rb#L139)
|
|
1544
|
-
|
|
1545
|
-
> def wait(milliseconds)
|
|
1546
|
-
|
|
1547
|
-
Pause for a number of milliseconds before the next action
|
|
1548
|
-
|
|
1549
|
-
__Parameters:__
|
|
1550
|
-
|
|
1551
|
-
[integer] milliseconds - Number of milliseconds to pause for
|
|
1552
|
-
|
|
1553
|
-
--
|
|
1554
|
-
|
|
1555
|
-
##### [swipe](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/touch_actions.rb#L162)
|
|
1556
|
-
|
|
1557
|
-
> def swipe(opts, ele = nil)
|
|
1558
|
-
|
|
1559
|
-
Convenience method to peform a swipe.
|
|
1560
|
-
|
|
1561
|
-
Note that iOS 7 simulators have broken swipe.
|
|
1562
|
-
|
|
1563
|
-
For iOS: Use `offset_x` and `offset_y` to define the end point.
|
|
1564
|
-
|
|
1565
|
-
For Android: Use `end_x` and `end_y` to define the end point.
|
|
1566
|
-
|
|
1567
|
-
If you'd like more details, please read tests and its log samples in
|
|
1568
|
-
`ios_tests/lib/ios/specs/device/touch_actions.rb` and `ios_tests/lib/ios/specs/device/touch_actions.rb`
|
|
1569
|
-
|
|
1570
|
-
__Parameters:__
|
|
1571
|
-
|
|
1572
|
-
[Hash] opts - a customizable set of options
|
|
1573
|
-
|
|
1574
|
-
--
|
|
1575
|
-
|
|
1576
|
-
##### [perform](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/touch_actions.rb#L187)
|
|
1577
|
-
|
|
1578
|
-
> def perform(driver = $driver)
|
|
1579
|
-
|
|
1580
|
-
Ask the driver to perform all actions in this action chain.
|
|
1581
|
-
|
|
1582
|
-
--
|
|
1583
|
-
|
|
1584
|
-
##### [cancel](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/touch_actions.rb#L194)
|
|
1585
|
-
|
|
1586
|
-
> def cancel(driver = $driver)
|
|
1587
|
-
|
|
1588
|
-
Does nothing, currently.
|
|
1589
|
-
|
|
1590
|
-
--
|
|
1591
|
-
|
|
1592
|
-
##### [swipe_coordinates](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/touch_actions.rb#L201)
|
|
1593
|
-
|
|
1594
|
-
> def swipe_coordinates(end_x: nil, end_y: nil, offset_x: nil, offset_y: nil, driver: $driver)
|
|
1595
|
-
|
|
1596
|
-
Visible for testing
|
|
1597
|
-
|
|
1598
|
-
--
|
|
1599
|
-
|
|
1600
|
-
##### [chain_method](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/touch_actions.rb#L219)
|
|
1601
|
-
|
|
1602
|
-
> def chain_method(method, args = nil)
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
--
|
|
1607
|
-
|
|
1608
|
-
##### [args_with_ele_ref](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/device/touch_actions.rb#L225)
|
|
1609
|
-
|
|
1610
|
-
> def args_with_ele_ref(args)
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
--
|
|
1615
|
-
|
|
1616
|
-
##### [initialize](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/common/wait.rb#L4)
|
|
1617
|
-
|
|
1618
|
-
> def initialize(opts = {})
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
__Returns:__
|
|
1623
|
-
|
|
1624
|
-
[Wait] a new instance of Wait
|
|
1625
|
-
|
|
1626
|
-
--
|
|
1627
|
-
|
|
1628
|
-
##### [until](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/common/wait.rb#L23)
|
|
1629
|
-
|
|
1630
|
-
> def until
|
|
1631
|
-
|
|
1632
|
-
Wait code from the selenium Ruby gem
|
|
1633
|
-
https://github.com/SeleniumHQ/selenium/blob/cf501dda3f0ed12233de51ce8170c0e8090f0c20/rb/lib/selenium/webdriver/common/wait.rb
|
|
1634
|
-
|
|
1635
|
-
--
|
|
1636
|
-
|
|
1637
|
-
##### [wait_true](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/common/wait.rb#L73)
|
|
1638
|
-
|
|
1639
|
-
> def wait_true(opts = {})
|
|
1640
|
-
|
|
1641
|
-
Check every interval seconds to see if yield returns a truthy value.
|
|
1642
|
-
Note this isn't a strict boolean true, any truthy value is accepted.
|
|
1643
|
-
false and nil are considered failures.
|
|
1644
|
-
Give up after timeout seconds.
|
|
1645
|
-
|
|
1646
|
-
Wait code from the selenium Ruby gem
|
|
1647
|
-
https://github.com/SeleniumHQ/selenium/blob/cf501dda3f0ed12233de51ce8170c0e8090f0c20/rb/lib/selenium/webdriver/common/wait.rb
|
|
1648
|
-
|
|
1649
|
-
If only a number is provided then it's treated as the timeout value.
|
|
1650
|
-
|
|
1651
|
-
__Parameters:__
|
|
1652
|
-
|
|
1653
|
-
[Hash] opts - Options
|
|
1654
|
-
|
|
1655
|
-
--
|
|
1656
|
-
|
|
1657
|
-
##### [wait](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/common/wait.rb#L96)
|
|
1658
|
-
|
|
1659
|
-
> def wait(opts = {})
|
|
1660
|
-
|
|
1661
|
-
Check every interval seconds to see if yield doesn't raise an exception.
|
|
1662
|
-
Give up after timeout seconds.
|
|
1663
|
-
|
|
1664
|
-
Wait code from the selenium Ruby gem
|
|
1665
|
-
https://github.com/SeleniumHQ/selenium/blob/cf501dda3f0ed12233de51ce8170c0e8090f0c20/rb/lib/selenium/webdriver/common/wait.rb
|
|
1666
|
-
|
|
1667
|
-
If only a number is provided then it's treated as the timeout value.
|
|
1668
|
-
|
|
1669
|
-
__Parameters:__
|
|
1670
|
-
|
|
1671
|
-
[Hash] opts - Options
|
|
1672
|
-
|
|
1673
|
-
--
|
|
1674
|
-
|
|
1675
|
-
##### [ignore](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/common/helper.rb#L24)
|
|
1676
|
-
|
|
1677
|
-
> def ignore
|
|
1678
|
-
|
|
1679
|
-
Return yield and ignore any exceptions.
|
|
1680
|
-
|
|
1681
|
-
--
|
|
1682
|
-
|
|
1683
|
-
##### [back](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/common/helper.rb#L31)
|
|
1684
|
-
|
|
1685
|
-
> def back
|
|
1686
|
-
|
|
1687
|
-
Navigate back.
|
|
1688
|
-
|
|
1689
|
-
__Returns:__
|
|
1690
|
-
|
|
1691
|
-
[void]
|
|
1692
|
-
|
|
1693
|
-
--
|
|
1694
|
-
|
|
1695
|
-
##### [session_id](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/common/helper.rb#L36)
|
|
1696
|
-
|
|
1697
|
-
> def session_id
|
|
1698
|
-
|
|
1699
|
-
For Sauce Labs reporting. Returns the current session id.
|
|
1700
|
-
|
|
1701
|
-
--
|
|
1702
|
-
|
|
1703
|
-
##### [xpath](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/common/helper.rb#L44)
|
|
1704
|
-
|
|
1705
|
-
> def xpath(xpath_str)
|
|
1706
|
-
|
|
1707
|
-
Returns the first element that matches the provided xpath.
|
|
1708
|
-
|
|
1709
|
-
__Parameters:__
|
|
1710
|
-
|
|
1711
|
-
[String] xpath_str - the XPath string
|
|
1712
|
-
|
|
1713
|
-
__Returns:__
|
|
1714
|
-
|
|
1715
|
-
[Element]
|
|
1716
|
-
|
|
1717
|
-
--
|
|
1718
|
-
|
|
1719
|
-
##### [xpaths](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/common/helper.rb#L52)
|
|
1720
|
-
|
|
1721
|
-
> def xpaths(xpath_str)
|
|
1722
|
-
|
|
1723
|
-
Returns all elements that match the provided xpath.
|
|
1724
|
-
|
|
1725
|
-
__Parameters:__
|
|
1726
|
-
|
|
1727
|
-
[String] xpath_str - the XPath string
|
|
1728
|
-
|
|
1729
|
-
__Returns:__
|
|
1730
|
-
|
|
1731
|
-
[Array<Element>]
|
|
1732
|
-
|
|
1733
|
-
--
|
|
1734
|
-
|
|
1735
|
-
##### [_print_source](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/common/helper.rb#L56)
|
|
1736
|
-
|
|
1737
|
-
> def _print_source(source)
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
--
|
|
1742
|
-
|
|
1743
|
-
##### [result](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/common/helper.rb#L69)
|
|
1744
|
-
|
|
1745
|
-
> def result
|
|
1746
|
-
|
|
1747
|
-
Returns the value of attribute result
|
|
1748
|
-
|
|
1749
|
-
--
|
|
1750
|
-
|
|
1751
|
-
##### [initialize](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/common/helper.rb#L71)
|
|
1752
|
-
|
|
1753
|
-
> def initialize
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
__Returns:__
|
|
1758
|
-
|
|
1759
|
-
[CountElements] a new instance of CountElements
|
|
1760
|
-
|
|
1761
|
-
--
|
|
1762
|
-
|
|
1763
|
-
##### [reset](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/common/helper.rb#L75)
|
|
1764
|
-
|
|
1765
|
-
> def reset
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
--
|
|
1770
|
-
|
|
1771
|
-
##### [start_element](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/common/helper.rb#L80)
|
|
1772
|
-
|
|
1773
|
-
> def start_element(name, attrs = [], driver = $driver)
|
|
1774
|
-
|
|
1775
|
-
http://nokogiri.org/Nokogiri/XML/SAX/Document.html
|
|
1776
|
-
|
|
1777
|
-
--
|
|
1778
|
-
|
|
1779
|
-
##### [formatted_result](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/common/helper.rb#L86)
|
|
1780
|
-
|
|
1781
|
-
> def formatted_result
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
--
|
|
1786
|
-
|
|
1787
|
-
##### [get_page_class](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/common/helper.rb#L97)
|
|
1788
|
-
|
|
1789
|
-
> def get_page_class
|
|
1790
|
-
|
|
1791
|
-
Returns a string of class counts of visible elements.
|
|
1792
|
-
|
|
1793
|
-
--
|
|
1794
|
-
|
|
1795
|
-
##### [page_class](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/common/helper.rb#L108)
|
|
1796
|
-
|
|
1797
|
-
> def page_class
|
|
1798
|
-
|
|
1799
|
-
Count all classes on screen and print to stdout.
|
|
1800
|
-
Useful for appium_console.
|
|
1801
|
-
|
|
1802
|
-
--
|
|
1803
|
-
|
|
1804
|
-
##### [px_to_window_rel](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/common/helper.rb#L118)
|
|
1805
|
-
|
|
1806
|
-
> def px_to_window_rel(opts = {}, driver = $driver)
|
|
1807
|
-
|
|
1808
|
-
Converts pixel values to window relative values
|
|
1809
|
-
|
|
1810
|
-
```ruby
|
|
1811
|
-
px_to_window_rel x: 50, y: 150
|
|
1812
|
-
```
|
|
1813
|
-
|
|
1814
|
-
--
|
|
1815
|
-
|
|
1816
|
-
##### [xml_keys](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/common/helper.rb#L137)
|
|
1817
|
-
|
|
1818
|
-
> def xml_keys(target)
|
|
1819
|
-
|
|
1820
|
-
Search strings.xml's values for target.
|
|
1821
|
-
|
|
1822
|
-
__Parameters:__
|
|
1823
|
-
|
|
1824
|
-
[String] target - the target to search for in strings.xml values
|
|
1825
|
-
|
|
1826
|
-
__Returns:__
|
|
1827
|
-
|
|
1828
|
-
[Array]
|
|
1829
|
-
|
|
1830
|
-
--
|
|
1149
|
+
Without auto_perform
|
|
1831
1150
|
|
|
1832
|
-
|
|
1151
|
+
```ruby
|
|
1152
|
+
action = zoom 200, false #=> Zoom in the screen from the center until it doubles in size.
|
|
1153
|
+
action.perform #=> to 25% of its size.
|
|
1154
|
+
```
|
|
1833
1155
|
|
|
1834
|
-
|
|
1156
|
+
With driver
|
|
1835
1157
|
|
|
1836
|
-
|
|
1158
|
+
```ruby
|
|
1159
|
+
driver = Appium::Driver.new(opts, false).start_driver
|
|
1160
|
+
pinch 200, true, driver #=> Zoom in the screen from the center until it doubles in size.
|
|
1161
|
+
```
|
|
1837
1162
|
|
|
1838
1163
|
__Parameters:__
|
|
1839
1164
|
|
|
1840
|
-
[
|
|
1165
|
+
[int] percentage - The percent size by which to shrink the screen when pinched.
|
|
1841
1166
|
|
|
1842
|
-
|
|
1167
|
+
[boolean] auto_perform - Whether to perform the action immediately (default true)
|
|
1843
1168
|
|
|
1844
|
-
[
|
|
1169
|
+
[Driver] driver - Set a driver to conduct the action. DEfault is global driver($driver)
|
|
1845
1170
|
|
|
1846
1171
|
--
|
|
1847
1172
|
|
|
1848
|
-
##### [
|
|
1849
|
-
|
|
1850
|
-
> def resolve_id(id)
|
|
1851
|
-
|
|
1852
|
-
Resolve id in strings.xml and return the value.
|
|
1173
|
+
##### [initialize](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/multi_touch.rb#L85)
|
|
1853
1174
|
|
|
1854
|
-
|
|
1175
|
+
> def initialize(driver = $driver)
|
|
1855
1176
|
|
|
1856
|
-
|
|
1177
|
+
self
|
|
1857
1178
|
|
|
1858
1179
|
__Returns:__
|
|
1859
1180
|
|
|
1860
|
-
[
|
|
1181
|
+
[MultiTouch] a new instance of MultiTouch
|
|
1861
1182
|
|
|
1862
1183
|
--
|
|
1863
1184
|
|
|
1864
|
-
##### [
|
|
1865
|
-
|
|
1866
|
-
> def filter
|
|
1867
|
-
|
|
1868
|
-
Returns the value of attribute filter
|
|
1869
|
-
|
|
1870
|
-
--
|
|
1185
|
+
##### [COMPLEX_ACTIONS](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/touch_actions.rb#L30)
|
|
1871
1186
|
|
|
1872
|
-
|
|
1187
|
+
> COMPLEX_ACTIONS = ::Appium::Core::TouchAction::COMPLEX_ACTIONS
|
|
1873
1188
|
|
|
1874
|
-
> def filter=(value)
|
|
1875
1189
|
|
|
1876
|
-
convert to string to support symbols
|
|
1877
1190
|
|
|
1878
1191
|
--
|
|
1879
1192
|
|
|
1880
|
-
##### [initialize](https://github.com/appium/ruby_lib/blob/
|
|
1193
|
+
##### [initialize](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/common/touch_actions.rb#L44)
|
|
1881
1194
|
|
|
1882
|
-
> def initialize
|
|
1195
|
+
> def initialize(driver = $driver)
|
|
1883
1196
|
|
|
1884
1197
|
|
|
1885
1198
|
|
|
1886
1199
|
__Returns:__
|
|
1887
1200
|
|
|
1888
|
-
[
|
|
1201
|
+
[TouchAction] a new instance of TouchAction
|
|
1889
1202
|
|
|
1890
1203
|
--
|
|
1891
1204
|
|
|
1892
|
-
##### [
|
|
1205
|
+
##### [for](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/android.rb#L15) android
|
|
1893
1206
|
|
|
1894
|
-
> def
|
|
1207
|
+
> def self.for(target)
|
|
1895
1208
|
|
|
1896
1209
|
|
|
1897
1210
|
|
|
1898
1211
|
--
|
|
1899
1212
|
|
|
1900
|
-
##### [
|
|
1213
|
+
##### [TextView](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/text.rb#L4) android
|
|
1901
1214
|
|
|
1902
|
-
>
|
|
1215
|
+
> TextView = 'android.widget.TextView'.freeze
|
|
1903
1216
|
|
|
1904
1217
|
|
|
1905
1218
|
|
|
1906
1219
|
--
|
|
1907
1220
|
|
|
1908
|
-
##### [
|
|
1221
|
+
##### [text](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/text.rb#L10) android
|
|
1909
1222
|
|
|
1910
|
-
> def
|
|
1223
|
+
> def text(value)
|
|
1224
|
+
|
|
1225
|
+
Find the first TextView that contains value or by index.
|
|
1226
|
+
If int then the TextView at that index is returned.
|
|
1911
1227
|
|
|
1228
|
+
__Parameters:__
|
|
1912
1229
|
|
|
1230
|
+
[String, Integer] value - the value to find.
|
|
1913
1231
|
|
|
1914
|
-
|
|
1232
|
+
__Returns:__
|
|
1915
1233
|
|
|
1916
|
-
|
|
1234
|
+
[TextView]
|
|
1917
1235
|
|
|
1918
|
-
|
|
1236
|
+
--
|
|
1919
1237
|
|
|
1238
|
+
##### [texts](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/text.rb#L19) android
|
|
1920
1239
|
|
|
1240
|
+
> def texts(value = false)
|
|
1921
1241
|
|
|
1922
|
-
|
|
1242
|
+
Find all TextViews containing value.
|
|
1243
|
+
If value is omitted, all texts are returned.
|
|
1923
1244
|
|
|
1924
|
-
|
|
1245
|
+
__Parameters:__
|
|
1925
1246
|
|
|
1926
|
-
|
|
1247
|
+
[String] value - the value to search for
|
|
1927
1248
|
|
|
1249
|
+
__Returns:__
|
|
1928
1250
|
|
|
1251
|
+
[Array<TextView>]
|
|
1929
1252
|
|
|
1930
1253
|
--
|
|
1931
1254
|
|
|
1932
|
-
##### [
|
|
1255
|
+
##### [first_text](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/text.rb#L26) android
|
|
1256
|
+
|
|
1257
|
+
> def first_text
|
|
1933
1258
|
|
|
1934
|
-
|
|
1259
|
+
Find the first TextView.
|
|
1935
1260
|
|
|
1261
|
+
__Returns:__
|
|
1936
1262
|
|
|
1263
|
+
[TextView]
|
|
1937
1264
|
|
|
1938
1265
|
--
|
|
1939
1266
|
|
|
1940
|
-
##### [
|
|
1941
|
-
|
|
1942
|
-
> COMMAND = {
|
|
1267
|
+
##### [last_text](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/text.rb#L32) android
|
|
1943
1268
|
|
|
1269
|
+
> def last_text
|
|
1944
1270
|
|
|
1271
|
+
Find the last TextView.
|
|
1945
1272
|
|
|
1946
|
-
|
|
1273
|
+
__Returns:__
|
|
1947
1274
|
|
|
1948
|
-
|
|
1275
|
+
[TextView]
|
|
1949
1276
|
|
|
1950
|
-
|
|
1277
|
+
--
|
|
1951
1278
|
|
|
1279
|
+
##### [text_exact](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/text.rb#L39) android
|
|
1952
1280
|
|
|
1281
|
+
> def text_exact(value)
|
|
1953
1282
|
|
|
1954
|
-
|
|
1283
|
+
Find the first TextView that exactly matches value.
|
|
1955
1284
|
|
|
1956
|
-
|
|
1285
|
+
__Parameters:__
|
|
1957
1286
|
|
|
1958
|
-
|
|
1287
|
+
[String] value - the value to match exactly
|
|
1959
1288
|
|
|
1289
|
+
__Returns:__
|
|
1960
1290
|
|
|
1291
|
+
[TextView]
|
|
1961
1292
|
|
|
1962
1293
|
--
|
|
1963
1294
|
|
|
1964
|
-
##### [
|
|
1295
|
+
##### [texts_exact](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/text.rb#L46) android
|
|
1965
1296
|
|
|
1966
|
-
> def
|
|
1297
|
+
> def texts_exact(value)
|
|
1967
1298
|
|
|
1968
|
-
|
|
1299
|
+
Find all TextViews that exactly match value.
|
|
1969
1300
|
|
|
1970
|
-
|
|
1301
|
+
__Parameters:__
|
|
1971
1302
|
|
|
1972
|
-
|
|
1303
|
+
[String] value - the value to match exactly
|
|
1973
1304
|
|
|
1974
|
-
|
|
1305
|
+
__Returns:__
|
|
1975
1306
|
|
|
1976
|
-
|
|
1307
|
+
[Array<TextView>]
|
|
1977
1308
|
|
|
1978
1309
|
--
|
|
1979
1310
|
|
|
1980
|
-
##### [result](https://github.com/appium/ruby_lib/blob/
|
|
1311
|
+
##### [result](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L6) android
|
|
1981
1312
|
|
|
1982
1313
|
> def result
|
|
1983
1314
|
|
|
@@ -1985,7 +1316,7 @@ Returns the value of attribute result
|
|
|
1985
1316
|
|
|
1986
1317
|
--
|
|
1987
1318
|
|
|
1988
|
-
##### [keys](https://github.com/appium/ruby_lib/blob/
|
|
1319
|
+
##### [keys](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L6) android
|
|
1989
1320
|
|
|
1990
1321
|
> def keys
|
|
1991
1322
|
|
|
@@ -1993,7 +1324,7 @@ Returns the value of attribute keys
|
|
|
1993
1324
|
|
|
1994
1325
|
--
|
|
1995
1326
|
|
|
1996
|
-
##### [filter](https://github.com/appium/ruby_lib/blob/
|
|
1327
|
+
##### [filter](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L6) android
|
|
1997
1328
|
|
|
1998
1329
|
> def filter
|
|
1999
1330
|
|
|
@@ -2001,7 +1332,7 @@ Returns the value of attribute filter
|
|
|
2001
1332
|
|
|
2002
1333
|
--
|
|
2003
1334
|
|
|
2004
|
-
##### [filter=](https://github.com/appium/ruby_lib/blob/
|
|
1335
|
+
##### [filter=](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L9) android
|
|
2005
1336
|
|
|
2006
1337
|
> def filter=(value)
|
|
2007
1338
|
|
|
@@ -2009,7 +1340,7 @@ convert to string to support symbols
|
|
|
2009
1340
|
|
|
2010
1341
|
--
|
|
2011
1342
|
|
|
2012
|
-
##### [initialize](https://github.com/appium/ruby_lib/blob/
|
|
1343
|
+
##### [initialize](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L15) android
|
|
2013
1344
|
|
|
2014
1345
|
> def initialize
|
|
2015
1346
|
|
|
@@ -2021,7 +1352,7 @@ __Returns:__
|
|
|
2021
1352
|
|
|
2022
1353
|
--
|
|
2023
1354
|
|
|
2024
|
-
##### [reset](https://github.com/appium/ruby_lib/blob/
|
|
1355
|
+
##### [reset](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L20) android
|
|
2025
1356
|
|
|
2026
1357
|
> def reset
|
|
2027
1358
|
|
|
@@ -2029,7 +1360,7 @@ __Returns:__
|
|
|
2029
1360
|
|
|
2030
1361
|
--
|
|
2031
1362
|
|
|
2032
|
-
##### [start_element](https://github.com/appium/ruby_lib/blob/
|
|
1363
|
+
##### [start_element](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L26) android
|
|
2033
1364
|
|
|
2034
1365
|
> def start_element(name, attrs = [], driver = $driver)
|
|
2035
1366
|
|
|
@@ -2037,7 +1368,7 @@ http://nokogiri.org/Nokogiri/XML/SAX/Document.html
|
|
|
2037
1368
|
|
|
2038
1369
|
--
|
|
2039
1370
|
|
|
2040
|
-
##### [source](https://github.com/appium/ruby_lib/blob/
|
|
1371
|
+
##### [source](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L76) android
|
|
2041
1372
|
|
|
2042
1373
|
> def source
|
|
2043
1374
|
|
|
@@ -2049,7 +1380,7 @@ __Returns:__
|
|
|
2049
1380
|
|
|
2050
1381
|
--
|
|
2051
1382
|
|
|
2052
|
-
##### [get_android_inspect](https://github.com/appium/ruby_lib/blob/
|
|
1383
|
+
##### [get_android_inspect](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L86) android
|
|
2053
1384
|
|
|
2054
1385
|
> def get_android_inspect(class_name = false)
|
|
2055
1386
|
|
|
@@ -2068,7 +1399,7 @@ __Returns:__
|
|
|
2068
1399
|
|
|
2069
1400
|
--
|
|
2070
1401
|
|
|
2071
|
-
##### [page](https://github.com/appium/ruby_lib/blob/
|
|
1402
|
+
##### [page](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L112) android
|
|
2072
1403
|
|
|
2073
1404
|
> def page(opts = {})
|
|
2074
1405
|
|
|
@@ -2087,7 +1418,7 @@ __Returns:__
|
|
|
2087
1418
|
|
|
2088
1419
|
--
|
|
2089
1420
|
|
|
2090
|
-
##### [current_app](https://github.com/appium/ruby_lib/blob/
|
|
1421
|
+
##### [current_app](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L124) android
|
|
2091
1422
|
|
|
2092
1423
|
> def current_app
|
|
2093
1424
|
|
|
@@ -2097,7 +1428,7 @@ example line:
|
|
|
2097
1428
|
|
|
2098
1429
|
--
|
|
2099
1430
|
|
|
2100
|
-
##### [id](https://github.com/appium/ruby_lib/blob/
|
|
1431
|
+
##### [id](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L148) android
|
|
2101
1432
|
|
|
2102
1433
|
> def id(id)
|
|
2103
1434
|
|
|
@@ -2113,7 +1444,7 @@ __Returns:__
|
|
|
2113
1444
|
|
|
2114
1445
|
--
|
|
2115
1446
|
|
|
2116
|
-
##### [ids](https://github.com/appium/ruby_lib/blob/
|
|
1447
|
+
##### [ids](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L156) android
|
|
2117
1448
|
|
|
2118
1449
|
> def ids(id)
|
|
2119
1450
|
|
|
@@ -2129,7 +1460,7 @@ __Returns:__
|
|
|
2129
1460
|
|
|
2130
1461
|
--
|
|
2131
1462
|
|
|
2132
|
-
##### [ele_index](https://github.com/appium/ruby_lib/blob/
|
|
1463
|
+
##### [ele_index](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L165) android
|
|
2133
1464
|
|
|
2134
1465
|
> def ele_index(class_name, index)
|
|
2135
1466
|
|
|
@@ -2147,7 +1478,7 @@ __Returns:__
|
|
|
2147
1478
|
|
|
2148
1479
|
--
|
|
2149
1480
|
|
|
2150
|
-
##### [first_ele](https://github.com/appium/ruby_lib/blob/
|
|
1481
|
+
##### [first_ele](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L183) android
|
|
2151
1482
|
|
|
2152
1483
|
> def first_ele(class_name)
|
|
2153
1484
|
|
|
@@ -2163,7 +1494,7 @@ __Returns:__
|
|
|
2163
1494
|
|
|
2164
1495
|
--
|
|
2165
1496
|
|
|
2166
|
-
##### [last_ele](https://github.com/appium/ruby_lib/blob/
|
|
1497
|
+
##### [last_ele](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L190) android
|
|
2167
1498
|
|
|
2168
1499
|
> def last_ele(class_name)
|
|
2169
1500
|
|
|
@@ -2179,7 +1510,7 @@ __Returns:__
|
|
|
2179
1510
|
|
|
2180
1511
|
--
|
|
2181
1512
|
|
|
2182
|
-
##### [tag](https://github.com/appium/ruby_lib/blob/
|
|
1513
|
+
##### [tag](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L198) android
|
|
2183
1514
|
|
|
2184
1515
|
> def tag(class_name)
|
|
2185
1516
|
|
|
@@ -2195,7 +1526,7 @@ __Returns:__
|
|
|
2195
1526
|
|
|
2196
1527
|
--
|
|
2197
1528
|
|
|
2198
|
-
##### [tags](https://github.com/appium/ruby_lib/blob/
|
|
1529
|
+
##### [tags](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L206) android
|
|
2199
1530
|
|
|
2200
1531
|
> def tags(class_name)
|
|
2201
1532
|
|
|
@@ -2211,7 +1542,7 @@ __Returns:__
|
|
|
2211
1542
|
|
|
2212
1543
|
--
|
|
2213
1544
|
|
|
2214
|
-
##### [string_visible_contains_xpath](https://github.com/appium/ruby_lib/blob/
|
|
1545
|
+
##### [string_visible_contains_xpath](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L249) android
|
|
2215
1546
|
|
|
2216
1547
|
> def string_visible_contains_xpath(class_name, value)
|
|
2217
1548
|
|
|
@@ -2232,7 +1563,7 @@ __Returns:__
|
|
|
2232
1563
|
|
|
2233
1564
|
--
|
|
2234
1565
|
|
|
2235
|
-
##### [string_visible_contains](https://github.com/appium/ruby_lib/blob/
|
|
1566
|
+
##### [string_visible_contains](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L269) android
|
|
2236
1567
|
|
|
2237
1568
|
> def string_visible_contains(class_name, value)
|
|
2238
1569
|
|
|
@@ -2253,7 +1584,7 @@ __Returns:__
|
|
|
2253
1584
|
|
|
2254
1585
|
--
|
|
2255
1586
|
|
|
2256
|
-
##### [complex_find_contains](https://github.com/appium/ruby_lib/blob/
|
|
1587
|
+
##### [complex_find_contains](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L287) android
|
|
2257
1588
|
|
|
2258
1589
|
> def complex_find_contains(class_name, value)
|
|
2259
1590
|
|
|
@@ -2271,7 +1602,7 @@ __Returns:__
|
|
|
2271
1602
|
|
|
2272
1603
|
--
|
|
2273
1604
|
|
|
2274
|
-
##### [complex_finds_contains](https://github.com/appium/ruby_lib/blob/
|
|
1605
|
+
##### [complex_finds_contains](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L295) android
|
|
2275
1606
|
|
|
2276
1607
|
> def complex_finds_contains(class_name, value)
|
|
2277
1608
|
|
|
@@ -2289,7 +1620,7 @@ __Returns:__
|
|
|
2289
1620
|
|
|
2290
1621
|
--
|
|
2291
1622
|
|
|
2292
|
-
##### [complex_find_exact](https://github.com/appium/ruby_lib/blob/
|
|
1623
|
+
##### [complex_find_exact](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L339) android
|
|
2293
1624
|
|
|
2294
1625
|
> def complex_find_exact(class_name, value)
|
|
2295
1626
|
|
|
@@ -2307,7 +1638,7 @@ __Returns:__
|
|
|
2307
1638
|
|
|
2308
1639
|
--
|
|
2309
1640
|
|
|
2310
|
-
##### [complex_finds_exact](https://github.com/appium/ruby_lib/blob/
|
|
1641
|
+
##### [complex_finds_exact](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L347) android
|
|
2311
1642
|
|
|
2312
1643
|
> def complex_finds_exact(class_name, value)
|
|
2313
1644
|
|
|
@@ -2325,7 +1656,7 @@ __Returns:__
|
|
|
2325
1656
|
|
|
2326
1657
|
--
|
|
2327
1658
|
|
|
2328
|
-
##### [get_source](https://github.com/appium/ruby_lib/blob/
|
|
1659
|
+
##### [get_source](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/common/helper.rb#L353) android
|
|
2329
1660
|
|
|
2330
1661
|
> def get_source
|
|
2331
1662
|
|
|
@@ -2337,137 +1668,7 @@ __Returns:__
|
|
|
2337
1668
|
|
|
2338
1669
|
--
|
|
2339
1670
|
|
|
2340
|
-
##### [
|
|
2341
|
-
|
|
2342
|
-
> def _nodeset_to_uiselector(opts = {})
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
--
|
|
2347
|
-
|
|
2348
|
-
##### [_client_xpath](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/android/client_xpath.rb#L20) android
|
|
2349
|
-
|
|
2350
|
-
> def _client_xpath(opts = {})
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
--
|
|
2355
|
-
|
|
2356
|
-
##### [client_xpath](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/android/client_xpath.rb#L37) android
|
|
2357
|
-
|
|
2358
|
-
> def client_xpath(xpath)
|
|
2359
|
-
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
--
|
|
2363
|
-
|
|
2364
|
-
##### [client_xpaths](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/android/client_xpath.rb#L43) android
|
|
2365
|
-
|
|
2366
|
-
> def client_xpaths(xpath)
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
--
|
|
2371
|
-
|
|
2372
|
-
##### [TextView](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/android/element/text.rb#L4) android
|
|
2373
|
-
|
|
2374
|
-
> TextView = 'android.widget.TextView'.freeze
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2378
|
-
--
|
|
2379
|
-
|
|
2380
|
-
##### [text](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/android/element/text.rb#L10) android
|
|
2381
|
-
|
|
2382
|
-
> def text(value)
|
|
2383
|
-
|
|
2384
|
-
Find the first TextView that contains value or by index.
|
|
2385
|
-
If int then the TextView at that index is returned.
|
|
2386
|
-
|
|
2387
|
-
__Parameters:__
|
|
2388
|
-
|
|
2389
|
-
[String, Integer] value - the value to find.
|
|
2390
|
-
|
|
2391
|
-
__Returns:__
|
|
2392
|
-
|
|
2393
|
-
[TextView]
|
|
2394
|
-
|
|
2395
|
-
--
|
|
2396
|
-
|
|
2397
|
-
##### [texts](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/android/element/text.rb#L19) android
|
|
2398
|
-
|
|
2399
|
-
> def texts(value = false)
|
|
2400
|
-
|
|
2401
|
-
Find all TextViews containing value.
|
|
2402
|
-
If value is omitted, all texts are returned.
|
|
2403
|
-
|
|
2404
|
-
__Parameters:__
|
|
2405
|
-
|
|
2406
|
-
[String] value - the value to search for
|
|
2407
|
-
|
|
2408
|
-
__Returns:__
|
|
2409
|
-
|
|
2410
|
-
[Array<TextView>]
|
|
2411
|
-
|
|
2412
|
-
--
|
|
2413
|
-
|
|
2414
|
-
##### [first_text](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/android/element/text.rb#L26) android
|
|
2415
|
-
|
|
2416
|
-
> def first_text
|
|
2417
|
-
|
|
2418
|
-
Find the first TextView.
|
|
2419
|
-
|
|
2420
|
-
__Returns:__
|
|
2421
|
-
|
|
2422
|
-
[TextView]
|
|
2423
|
-
|
|
2424
|
-
--
|
|
2425
|
-
|
|
2426
|
-
##### [last_text](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/android/element/text.rb#L32) android
|
|
2427
|
-
|
|
2428
|
-
> def last_text
|
|
2429
|
-
|
|
2430
|
-
Find the last TextView.
|
|
2431
|
-
|
|
2432
|
-
__Returns:__
|
|
2433
|
-
|
|
2434
|
-
[TextView]
|
|
2435
|
-
|
|
2436
|
-
--
|
|
2437
|
-
|
|
2438
|
-
##### [text_exact](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/android/element/text.rb#L39) android
|
|
2439
|
-
|
|
2440
|
-
> def text_exact(value)
|
|
2441
|
-
|
|
2442
|
-
Find the first TextView that exactly matches value.
|
|
2443
|
-
|
|
2444
|
-
__Parameters:__
|
|
2445
|
-
|
|
2446
|
-
[String] value - the value to match exactly
|
|
2447
|
-
|
|
2448
|
-
__Returns:__
|
|
2449
|
-
|
|
2450
|
-
[TextView]
|
|
2451
|
-
|
|
2452
|
-
--
|
|
2453
|
-
|
|
2454
|
-
##### [texts_exact](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/android/element/text.rb#L46) android
|
|
2455
|
-
|
|
2456
|
-
> def texts_exact(value)
|
|
2457
|
-
|
|
2458
|
-
Find all TextViews that exactly match value.
|
|
2459
|
-
|
|
2460
|
-
__Parameters:__
|
|
2461
|
-
|
|
2462
|
-
[String] value - the value to match exactly
|
|
2463
|
-
|
|
2464
|
-
__Returns:__
|
|
2465
|
-
|
|
2466
|
-
[Array<TextView>]
|
|
2467
|
-
|
|
2468
|
-
--
|
|
2469
|
-
|
|
2470
|
-
##### [alert_click](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/android/element/alert.rb#L6) android
|
|
1671
|
+
##### [alert_click](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/alert.rb#L6) android
|
|
2471
1672
|
|
|
2472
1673
|
> def alert_click(value)
|
|
2473
1674
|
|
|
@@ -2483,7 +1684,7 @@ __Returns:__
|
|
|
2483
1684
|
|
|
2484
1685
|
--
|
|
2485
1686
|
|
|
2486
|
-
##### [alert_accept](https://github.com/appium/ruby_lib/blob/
|
|
1687
|
+
##### [alert_accept](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/alert.rb#L13) android
|
|
2487
1688
|
|
|
2488
1689
|
> def alert_accept
|
|
2489
1690
|
|
|
@@ -2496,7 +1697,7 @@ __Returns:__
|
|
|
2496
1697
|
|
|
2497
1698
|
--
|
|
2498
1699
|
|
|
2499
|
-
##### [alert_accept_text](https://github.com/appium/ruby_lib/blob/
|
|
1700
|
+
##### [alert_accept_text](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/alert.rb#L20) android
|
|
2500
1701
|
|
|
2501
1702
|
> def alert_accept_text
|
|
2502
1703
|
|
|
@@ -2509,7 +1710,7 @@ __Returns:__
|
|
|
2509
1710
|
|
|
2510
1711
|
--
|
|
2511
1712
|
|
|
2512
|
-
##### [alert_dismiss](https://github.com/appium/ruby_lib/blob/
|
|
1713
|
+
##### [alert_dismiss](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/alert.rb#L27) android
|
|
2513
1714
|
|
|
2514
1715
|
> def alert_dismiss
|
|
2515
1716
|
|
|
@@ -2522,7 +1723,7 @@ __Returns:__
|
|
|
2522
1723
|
|
|
2523
1724
|
--
|
|
2524
1725
|
|
|
2525
|
-
##### [alert_dismiss_text](https://github.com/appium/ruby_lib/blob/
|
|
1726
|
+
##### [alert_dismiss_text](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/alert.rb#L34) android
|
|
2526
1727
|
|
|
2527
1728
|
> def alert_dismiss_text
|
|
2528
1729
|
|
|
@@ -2535,7 +1736,7 @@ __Returns:__
|
|
|
2535
1736
|
|
|
2536
1737
|
--
|
|
2537
1738
|
|
|
2538
|
-
##### [Button](https://github.com/appium/ruby_lib/blob/
|
|
1739
|
+
##### [Button](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/button.rb#L3) android
|
|
2539
1740
|
|
|
2540
1741
|
> Button = 'android.widget.Button'.freeze
|
|
2541
1742
|
|
|
@@ -2543,7 +1744,7 @@ __Returns:__
|
|
|
2543
1744
|
|
|
2544
1745
|
--
|
|
2545
1746
|
|
|
2546
|
-
##### [ImageButton](https://github.com/appium/ruby_lib/blob/
|
|
1747
|
+
##### [ImageButton](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/button.rb#L4) android
|
|
2547
1748
|
|
|
2548
1749
|
> ImageButton = 'android.widget.ImageButton'.freeze
|
|
2549
1750
|
|
|
@@ -2551,7 +1752,7 @@ __Returns:__
|
|
|
2551
1752
|
|
|
2552
1753
|
--
|
|
2553
1754
|
|
|
2554
|
-
##### [button](https://github.com/appium/ruby_lib/blob/
|
|
1755
|
+
##### [button](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/button.rb#L10) android
|
|
2555
1756
|
|
|
2556
1757
|
> def button(value)
|
|
2557
1758
|
|
|
@@ -2568,7 +1769,7 @@ __Returns:__
|
|
|
2568
1769
|
|
|
2569
1770
|
--
|
|
2570
1771
|
|
|
2571
|
-
##### [buttons](https://github.com/appium/ruby_lib/blob/
|
|
1772
|
+
##### [buttons](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/button.rb#L27) android
|
|
2572
1773
|
|
|
2573
1774
|
> def buttons(value = false)
|
|
2574
1775
|
|
|
@@ -2585,7 +1786,7 @@ __Returns:__
|
|
|
2585
1786
|
|
|
2586
1787
|
--
|
|
2587
1788
|
|
|
2588
|
-
##### [first_button](https://github.com/appium/ruby_lib/blob/
|
|
1789
|
+
##### [first_button](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/button.rb#L34) android
|
|
2589
1790
|
|
|
2590
1791
|
> def first_button
|
|
2591
1792
|
|
|
@@ -2597,7 +1798,7 @@ __Returns:__
|
|
|
2597
1798
|
|
|
2598
1799
|
--
|
|
2599
1800
|
|
|
2600
|
-
##### [last_button](https://github.com/appium/ruby_lib/blob/
|
|
1801
|
+
##### [last_button](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/button.rb#L40) android
|
|
2601
1802
|
|
|
2602
1803
|
> def last_button
|
|
2603
1804
|
|
|
@@ -2609,7 +1810,7 @@ __Returns:__
|
|
|
2609
1810
|
|
|
2610
1811
|
--
|
|
2611
1812
|
|
|
2612
|
-
##### [button_exact](https://github.com/appium/ruby_lib/blob/
|
|
1813
|
+
##### [button_exact](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/button.rb#L56) android
|
|
2613
1814
|
|
|
2614
1815
|
> def button_exact(value)
|
|
2615
1816
|
|
|
@@ -2625,7 +1826,7 @@ __Returns:__
|
|
|
2625
1826
|
|
|
2626
1827
|
--
|
|
2627
1828
|
|
|
2628
|
-
##### [buttons_exact](https://github.com/appium/ruby_lib/blob/
|
|
1829
|
+
##### [buttons_exact](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/button.rb#L63) android
|
|
2629
1830
|
|
|
2630
1831
|
> def buttons_exact(value)
|
|
2631
1832
|
|
|
@@ -2641,19 +1842,7 @@ __Returns:__
|
|
|
2641
1842
|
|
|
2642
1843
|
--
|
|
2643
1844
|
|
|
2644
|
-
##### [
|
|
2645
|
-
|
|
2646
|
-
> def uiautomator_find
|
|
2647
|
-
|
|
2648
|
-
find_element/s can be used with a [UISelector](http://developer.android.com/tools/help/uiautomator/UiSelector.html).
|
|
2649
|
-
|
|
2650
|
-
```ruby
|
|
2651
|
-
find_elements :uiautomator, 'new UiSelector().clickable(true)'
|
|
2652
|
-
```
|
|
2653
|
-
|
|
2654
|
-
--
|
|
2655
|
-
|
|
2656
|
-
##### [find](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/android/element/generic.rb#L6) android
|
|
1845
|
+
##### [find](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/generic.rb#L6) android
|
|
2657
1846
|
|
|
2658
1847
|
> def find(value)
|
|
2659
1848
|
|
|
@@ -2669,7 +1858,7 @@ __Returns:__
|
|
|
2669
1858
|
|
|
2670
1859
|
--
|
|
2671
1860
|
|
|
2672
|
-
##### [finds](https://github.com/appium/ruby_lib/blob/
|
|
1861
|
+
##### [finds](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/generic.rb#L13) android
|
|
2673
1862
|
|
|
2674
1863
|
> def finds(value)
|
|
2675
1864
|
|
|
@@ -2685,7 +1874,7 @@ __Returns:__
|
|
|
2685
1874
|
|
|
2686
1875
|
--
|
|
2687
1876
|
|
|
2688
|
-
##### [find_exact](https://github.com/appium/ruby_lib/blob/
|
|
1877
|
+
##### [find_exact](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/generic.rb#L20) android
|
|
2689
1878
|
|
|
2690
1879
|
> def find_exact(value)
|
|
2691
1880
|
|
|
@@ -2701,7 +1890,7 @@ __Returns:__
|
|
|
2701
1890
|
|
|
2702
1891
|
--
|
|
2703
1892
|
|
|
2704
|
-
##### [finds_exact](https://github.com/appium/ruby_lib/blob/
|
|
1893
|
+
##### [finds_exact](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/generic.rb#L27) android
|
|
2705
1894
|
|
|
2706
1895
|
> def finds_exact(value)
|
|
2707
1896
|
|
|
@@ -2717,7 +1906,7 @@ __Returns:__
|
|
|
2717
1906
|
|
|
2718
1907
|
--
|
|
2719
1908
|
|
|
2720
|
-
##### [scroll_to](https://github.com/appium/ruby_lib/blob/
|
|
1909
|
+
##### [scroll_to](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/generic.rb#L40) android
|
|
2721
1910
|
|
|
2722
1911
|
> def scroll_to(text, scrollable_index = 0)
|
|
2723
1912
|
|
|
@@ -2735,7 +1924,7 @@ __Returns:__
|
|
|
2735
1924
|
|
|
2736
1925
|
--
|
|
2737
1926
|
|
|
2738
|
-
##### [scroll_to_exact](https://github.com/appium/ruby_lib/blob/
|
|
1927
|
+
##### [scroll_to_exact](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/generic.rb#L58) android
|
|
2739
1928
|
|
|
2740
1929
|
> def scroll_to_exact(text, scrollable_index = 0)
|
|
2741
1930
|
|
|
@@ -2753,7 +1942,7 @@ __Returns:__
|
|
|
2753
1942
|
|
|
2754
1943
|
--
|
|
2755
1944
|
|
|
2756
|
-
##### [EditText](https://github.com/appium/ruby_lib/blob/
|
|
1945
|
+
##### [EditText](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/textfield.rb#L3) android
|
|
2757
1946
|
|
|
2758
1947
|
> EditText = 'android.widget.EditText'.freeze
|
|
2759
1948
|
|
|
@@ -2761,7 +1950,7 @@ __Returns:__
|
|
|
2761
1950
|
|
|
2762
1951
|
--
|
|
2763
1952
|
|
|
2764
|
-
##### [textfield](https://github.com/appium/ruby_lib/blob/
|
|
1953
|
+
##### [textfield](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/textfield.rb#L9) android
|
|
2765
1954
|
|
|
2766
1955
|
> def textfield(value)
|
|
2767
1956
|
|
|
@@ -2778,7 +1967,7 @@ __Returns:__
|
|
|
2778
1967
|
|
|
2779
1968
|
--
|
|
2780
1969
|
|
|
2781
|
-
##### [textfields](https://github.com/appium/ruby_lib/blob/
|
|
1970
|
+
##### [textfields](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/textfield.rb#L18) android
|
|
2782
1971
|
|
|
2783
1972
|
> def textfields(value = false)
|
|
2784
1973
|
|
|
@@ -2795,7 +1984,7 @@ __Returns:__
|
|
|
2795
1984
|
|
|
2796
1985
|
--
|
|
2797
1986
|
|
|
2798
|
-
##### [first_textfield](https://github.com/appium/ruby_lib/blob/
|
|
1987
|
+
##### [first_textfield](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/textfield.rb#L25) android
|
|
2799
1988
|
|
|
2800
1989
|
> def first_textfield
|
|
2801
1990
|
|
|
@@ -2807,7 +1996,7 @@ __Returns:__
|
|
|
2807
1996
|
|
|
2808
1997
|
--
|
|
2809
1998
|
|
|
2810
|
-
##### [last_textfield](https://github.com/appium/ruby_lib/blob/
|
|
1999
|
+
##### [last_textfield](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/textfield.rb#L31) android
|
|
2811
2000
|
|
|
2812
2001
|
> def last_textfield
|
|
2813
2002
|
|
|
@@ -2819,7 +2008,7 @@ __Returns:__
|
|
|
2819
2008
|
|
|
2820
2009
|
--
|
|
2821
2010
|
|
|
2822
|
-
##### [textfield_exact](https://github.com/appium/ruby_lib/blob/
|
|
2011
|
+
##### [textfield_exact](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/textfield.rb#L38) android
|
|
2823
2012
|
|
|
2824
2013
|
> def textfield_exact(value)
|
|
2825
2014
|
|
|
@@ -2835,7 +2024,7 @@ __Returns:__
|
|
|
2835
2024
|
|
|
2836
2025
|
--
|
|
2837
2026
|
|
|
2838
|
-
##### [textfields_exact](https://github.com/appium/ruby_lib/blob/
|
|
2027
|
+
##### [textfields_exact](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/element/textfield.rb#L45) android
|
|
2839
2028
|
|
|
2840
2029
|
> def textfields_exact(value)
|
|
2841
2030
|
|
|
@@ -2851,7 +2040,15 @@ __Returns:__
|
|
|
2851
2040
|
|
|
2852
2041
|
--
|
|
2853
2042
|
|
|
2854
|
-
##### [
|
|
2043
|
+
##### [for](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/uiautomator2/bridge.rb#L7) android
|
|
2044
|
+
|
|
2045
|
+
> def self.for(target)
|
|
2046
|
+
|
|
2047
|
+
|
|
2048
|
+
|
|
2049
|
+
--
|
|
2050
|
+
|
|
2051
|
+
##### [string_visible_contains](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/uiautomator2/helper.rb#L13) android
|
|
2855
2052
|
|
|
2856
2053
|
> def string_visible_contains(class_name, value)
|
|
2857
2054
|
|
|
@@ -2872,7 +2069,7 @@ __Returns:__
|
|
|
2872
2069
|
|
|
2873
2070
|
--
|
|
2874
2071
|
|
|
2875
|
-
##### [complex_find_contains](https://github.com/appium/ruby_lib/blob/
|
|
2072
|
+
##### [complex_find_contains](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/uiautomator2/helper.rb#L31) android
|
|
2876
2073
|
|
|
2877
2074
|
> def complex_find_contains(class_name, value)
|
|
2878
2075
|
|
|
@@ -2890,7 +2087,7 @@ __Returns:__
|
|
|
2890
2087
|
|
|
2891
2088
|
--
|
|
2892
2089
|
|
|
2893
|
-
##### [complex_finds_contains](https://github.com/appium/ruby_lib/blob/
|
|
2090
|
+
##### [complex_finds_contains](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/uiautomator2/helper.rb#L41) android
|
|
2894
2091
|
|
|
2895
2092
|
> def complex_finds_contains(class_name, value)
|
|
2896
2093
|
|
|
@@ -2908,7 +2105,7 @@ __Returns:__
|
|
|
2908
2105
|
|
|
2909
2106
|
--
|
|
2910
2107
|
|
|
2911
|
-
##### [complex_find_exact](https://github.com/appium/ruby_lib/blob/
|
|
2108
|
+
##### [complex_find_exact](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/uiautomator2/helper.rb#L69) android
|
|
2912
2109
|
|
|
2913
2110
|
> def complex_find_exact(class_name, value)
|
|
2914
2111
|
|
|
@@ -2926,7 +2123,7 @@ __Returns:__
|
|
|
2926
2123
|
|
|
2927
2124
|
--
|
|
2928
2125
|
|
|
2929
|
-
##### [complex_finds_exact](https://github.com/appium/ruby_lib/blob/
|
|
2126
|
+
##### [complex_finds_exact](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/uiautomator2/helper.rb#L79) android
|
|
2930
2127
|
|
|
2931
2128
|
> def complex_finds_exact(class_name, value)
|
|
2932
2129
|
|
|
@@ -2944,7 +2141,7 @@ __Returns:__
|
|
|
2944
2141
|
|
|
2945
2142
|
--
|
|
2946
2143
|
|
|
2947
|
-
##### [button](https://github.com/appium/ruby_lib/blob/
|
|
2144
|
+
##### [button](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/uiautomator2/element/button.rb#L9) android
|
|
2948
2145
|
|
|
2949
2146
|
> def button(value)
|
|
2950
2147
|
|
|
@@ -2961,7 +2158,7 @@ __Returns:__
|
|
|
2961
2158
|
|
|
2962
2159
|
--
|
|
2963
2160
|
|
|
2964
|
-
##### [buttons](https://github.com/appium/ruby_lib/blob/
|
|
2161
|
+
##### [buttons](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/uiautomator2/element/button.rb#L29) android
|
|
2965
2162
|
|
|
2966
2163
|
> def buttons(value = false)
|
|
2967
2164
|
|
|
@@ -2978,7 +2175,7 @@ __Returns:__
|
|
|
2978
2175
|
|
|
2979
2176
|
--
|
|
2980
2177
|
|
|
2981
|
-
##### [first_button](https://github.com/appium/ruby_lib/blob/
|
|
2178
|
+
##### [first_button](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/uiautomator2/element/button.rb#L36) android
|
|
2982
2179
|
|
|
2983
2180
|
> def first_button
|
|
2984
2181
|
|
|
@@ -2990,7 +2187,7 @@ __Returns:__
|
|
|
2990
2187
|
|
|
2991
2188
|
--
|
|
2992
2189
|
|
|
2993
|
-
##### [last_button](https://github.com/appium/ruby_lib/blob/
|
|
2190
|
+
##### [last_button](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/uiautomator2/element/button.rb#L43) android
|
|
2994
2191
|
|
|
2995
2192
|
> def last_button
|
|
2996
2193
|
|
|
@@ -3002,7 +2199,7 @@ __Returns:__
|
|
|
3002
2199
|
|
|
3003
2200
|
--
|
|
3004
2201
|
|
|
3005
|
-
##### [button_exact](https://github.com/appium/ruby_lib/blob/
|
|
2202
|
+
##### [button_exact](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/uiautomator2/element/button.rb#L60) android
|
|
3006
2203
|
|
|
3007
2204
|
> def button_exact(value)
|
|
3008
2205
|
|
|
@@ -3018,7 +2215,7 @@ __Returns:__
|
|
|
3018
2215
|
|
|
3019
2216
|
--
|
|
3020
2217
|
|
|
3021
|
-
##### [buttons_exact](https://github.com/appium/ruby_lib/blob/
|
|
2218
|
+
##### [buttons_exact](https://github.com/appium/ruby_lib/blob/01c8b6f15e8d01eb6b4e995eb265d1d1e8cf2332/lib/appium_lib/android/uiautomator2/element/button.rb#L68) android
|
|
3022
2219
|
|
|
3023
2220
|
> def buttons_exact(value)
|
|
3024
2221
|
|
|
@@ -3034,55 +2231,3 @@ __Returns:__
|
|
|
3034
2231
|
|
|
3035
2232
|
--
|
|
3036
2233
|
|
|
3037
|
-
##### [value](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/common/patch.rb#L12)
|
|
3038
|
-
|
|
3039
|
-
> def value
|
|
3040
|
-
|
|
3041
|
-
Returns the value attribute
|
|
3042
|
-
|
|
3043
|
-
Fixes NoMethodError: undefined method `value' for Selenium::WebDriver::Element
|
|
3044
|
-
|
|
3045
|
-
--
|
|
3046
|
-
|
|
3047
|
-
##### [name](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/common/patch.rb#L19)
|
|
3048
|
-
|
|
3049
|
-
> def name
|
|
3050
|
-
|
|
3051
|
-
Returns the name attribute
|
|
3052
|
-
|
|
3053
|
-
Fixes NoMethodError: undefined method `name' for Selenium::WebDriver::Element
|
|
3054
|
-
|
|
3055
|
-
--
|
|
3056
|
-
|
|
3057
|
-
##### [location_rel](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/common/patch.rb#L30)
|
|
3058
|
-
|
|
3059
|
-
> def location_rel(driver = $driver)
|
|
3060
|
-
|
|
3061
|
-
For use with mobile tap.
|
|
3062
|
-
|
|
3063
|
-
```ruby
|
|
3064
|
-
execute_script 'mobile: tap', :x => 0.0, :y => 0.98
|
|
3065
|
-
```
|
|
3066
|
-
|
|
3067
|
-
__Returns:__
|
|
3068
|
-
|
|
3069
|
-
[OpenStruct] the relative x, y in a struct. ex: { x: 0.50, y: 0.20 }
|
|
3070
|
-
|
|
3071
|
-
--
|
|
3072
|
-
|
|
3073
|
-
##### [DEFAULT_HEADERS](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/common/patch.rb#L170)
|
|
3074
|
-
|
|
3075
|
-
> DEFAULT_HEADERS = { 'Accept' => CONTENT_TYPE, 'User-Agent' => "appium/ruby_lib/#{::Appium::VERSION}" }.freeze
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
--
|
|
3080
|
-
|
|
3081
|
-
##### [patch_remote_driver_commands](https://github.com/appium/ruby_lib/blob/95118d4e0a6ec285e55862ea6b6fed528711ad84/lib/appium_lib/common/patch.rb#L173)
|
|
3082
|
-
|
|
3083
|
-
> def patch_remote_driver_commands
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
--
|
|
3088
|
-
|