appium_lib_core 3.6.1 → 3.10.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1011b8828b2d0dca338df3813ecb9f4b5e43464cff713c23b5a3c144a6ccdeba
4
- data.tar.gz: b120ea9cae3e309ea11b00f9a87861db272aa4c3bd422e184f9b7ac4e01c84d3
3
+ metadata.gz: c12935613549b56a5c64e6a9b8ac3ee272cd940e5447a25fa9ca64bc3ca28eb6
4
+ data.tar.gz: 7009108008d6a36db80907b8d04e6d4081c29c8790f31f81daa4a3b776403a08
5
5
  SHA512:
6
- metadata.gz: 7c0abe1f60c93f5c32d3ed9597180c863e52dc3ddc3b1277ddcec37e07b872f679cd7f4f6f7cd14c16724f4664e38ca2d18ac598c9773241bcd3cbf83ffe33b5
7
- data.tar.gz: 19d0aa306e8a1956365cda6fe589a2d3e4ebca3a5fe62b69c1fa9702d85b7389dacaadb26d24500b73c00d1462bf46a0eff53aa853621221dacf814862810e2c
6
+ metadata.gz: 9016f1d60a516a507e20e553c2ec6e4cc31217f4a82271eb96633218739eb424dba4d67bbf3e37ee96dff91105af6fe38edf9d55a40a42ece12237a09c08cb7d
7
+ data.tar.gz: '096b252e25e6b1c2ee87a05a47a0d40bde02fc12e26912cd45c6f443f28482b823d4026eaa0ce9db85f01c8796b17b427fd53936b439703a6833378d6ee8ab82'
@@ -0,0 +1,29 @@
1
+ ---
2
+ name: issue report
3
+ about: Create a report to help us improve
4
+ title: ''
5
+ labels: ''
6
+ assignees: ''
7
+
8
+ ---
9
+
10
+ ## This is a
11
+ * [ ] Bug report
12
+ * [ ] Question
13
+ * [ ] Feature Request
14
+
15
+ ## Summary
16
+
17
+ ## Environment
18
+ * `ruby_lib_core` version:
19
+ * Mobile platform/version/device under test:
20
+
21
+ ## Actual behaviour and steps to reproduce
22
+
23
+ ## Expected behaviour
24
+
25
+ ## Link to Appium/Ruby logs
26
+
27
+ Create a [GIST](https://gist.github.com) which is a paste of your _full_ Appium logs, and link them here.
28
+
29
+ ## Any additional comments
@@ -0,0 +1,68 @@
1
+ name: Runs lint and unit tests
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ test:
11
+ strategy:
12
+ fail-fast: false
13
+ matrix:
14
+ ruby: [2.2, 2.3, 2.4, 2.5, 2.6, 2.7]
15
+
16
+ runs-on: ubuntu-latest
17
+
18
+ env:
19
+ UNIT_TEST: true
20
+
21
+ steps:
22
+ - uses: actions/checkout@v2
23
+ - name: Set up Ruby
24
+ uses: ruby/setup-ruby@v1
25
+ with:
26
+ ruby-version: ${{ matrix.ruby }}
27
+ - name: Install dependencies
28
+ run: bundle install
29
+ - name: Run tests
30
+ run: |
31
+ bundle exec rake rubocop
32
+ bundle exec parallel_test test/unit/ -n 4
33
+ AUTOMATION_NAME_DROID=espresso bundle exec parallel_test test/unit/android -n 4
34
+ AUTOMATION_NAME_DROID=appium AUTOMATION_NAME_IOS=appium bundle exec parallel_test test/unit -n 4
35
+
36
+ test-win:
37
+ strategy:
38
+ fail-fast: false
39
+ matrix:
40
+ # Does not add 2.7 on Windows so far since a command fails only on Windows
41
+ ruby: [2.2, 2.3, 2.4, 2.5, 2.6]
42
+
43
+ runs-on: windows-latest
44
+
45
+ env:
46
+ UNIT_TEST: true
47
+
48
+ steps:
49
+ - uses: actions/checkout@v2
50
+ - name: Set up Ruby
51
+ uses: ruby/setup-ruby@v1
52
+ with:
53
+ ruby-version: ${{ matrix.ruby }}
54
+ - name: Install dependencies
55
+ run: |
56
+ gem install ffi
57
+ bundle install
58
+ gem uninstall --force eventmachine && gem install eventmachine --platform ruby
59
+ - name: Run tests
60
+ run: |
61
+ parallel_test test/unit/ -n 4
62
+
63
+ setx AUTOMATION_NAME_DROID espresso
64
+ parallel_test test/unit/android -n 4
65
+
66
+ setx AUTOMATION_NAME_DROID appium
67
+ setx AUTOMATION_NAME_IOS appium
68
+ parallel_test test/unit -n 4
@@ -11,11 +11,11 @@ Metrics/ClassLength:
11
11
  Metrics/AbcSize:
12
12
  Enabled: false
13
13
  Metrics/CyclomaticComplexity:
14
- Max: 13
14
+ Max: 14
15
15
  Metrics/PerceivedComplexity:
16
- Max: 13
16
+ Max: 14
17
17
  Metrics/ParameterLists:
18
- Max: 6
18
+ Enabled: false
19
19
  Lint/NestedMethodDefinition:
20
20
  Enabled: false
21
21
  # TODO: Replace <<- with <<~ after dropping Ruby 2.2
@@ -10,6 +10,69 @@ Read `release_notes.md` for commit level details.
10
10
 
11
11
  ### Deprecations
12
12
 
13
+ ## [3.10.1] - 2020-06-29
14
+
15
+ ### Enhancements
16
+
17
+ ### Bug fixes
18
+ - Fix duplication warning of `execute_cdp`
19
+
20
+ ### Deprecations
21
+
22
+ ## [3.10.0] - 2020-06-09
23
+
24
+ ### Enhancements
25
+ - Remove deprecated `Selenium::WebDriver::Error::TimeOutError`
26
+
27
+ ### Bug fixes
28
+
29
+ ### Deprecations
30
+
31
+ ## [3.9.0] - 2020-05-31
32
+
33
+ ### Enhancements
34
+ - `capabilities:` is available in addition to `desired_capabilities:` and `caps:` as a capability
35
+ ```ruby
36
+ # case 1
37
+ opts = { caps: { }, appium_lib: { } }
38
+ @driver = Appium::Core.for(opts).start_driver
39
+
40
+ # case 2
41
+ opts = { capabilities: { }, appium_lib: { } }
42
+ @driver = Appium::Core.for(opts).start_driver
43
+
44
+ # case 3
45
+ opts = { desired_capabilities: { }, appium_lib: { } }
46
+ @driver = Appium::Core.for(opts).start_driver
47
+ ```
48
+
49
+ ### Bug fixes
50
+
51
+ ### Deprecations
52
+
53
+ ## [3.8.0] - 2020-05-17
54
+
55
+ ### Enhancements
56
+ - Add options for `start_recording_screen`
57
+ - `file_field_name`, `form_fields` and `headers` are available since Appium 1.18.0
58
+
59
+ ### Bug fixes
60
+ - Fix `x-idempotency-key` header to add it only in new session request (https://github.com/appium/ruby_lib_core/issues/262)
61
+
62
+ ### Deprecations
63
+
64
+ ## [3.7.0] - 2020-04-18
65
+
66
+ ### Enhancements
67
+ - Add `x-idempotency-key` header support (https://github.com/appium/appium-base-driver/pull/400)
68
+ - Can disable the header with `enable_idempotency_header: false` in `appium_lib` capability. Defaults to `true`.
69
+ - Add chrome devtools endpoint which is available chrome module in Selenium Ruby binding
70
+ - https://github.com/appium/appium-base-driver/pull/405
71
+
72
+ ### Bug fixes
73
+
74
+ ### Deprecations
75
+
13
76
  ## [3.6.1, 3.6.0] - 2020-03-15
14
77
 
15
78
  ### Enhancements
data/README.md CHANGED
@@ -2,9 +2,7 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/appium_lib_core.svg)](https://badge.fury.io/rb/appium_lib_core)
4
4
 
5
- | Travis, Ubuntu | Azure, Windows and functional tests |
6
- |:---:|:---:|
7
- |[![Build Status](https://travis-ci.org/appium/ruby_lib_core.svg?branch=master)](https://travis-ci.org/appium/ruby_lib_core)|[![Build Status](https://dev.azure.com/kazucocoa/ruby_lib_core/_apis/build/status/ruby_lib_core?branchName=master)](https://dev.azure.com/kazucocoa/ruby_lib_core/_build/latest?definitionId=9&branchName=master)|
5
+ [![Build Status](https://dev.azure.com/kazucocoa/ruby_lib_core/_apis/build/status/ruby_lib_core?branchName=master)](https://dev.azure.com/kazucocoa/ruby_lib_core/_build/latest?definitionId=9&branchName=master)
8
6
 
9
7
  This library is a Ruby client for Appium. The gem is available via [appium_lib_core](https://rubygems.org/gems/appium_lib_core).
10
8
 
@@ -4,26 +4,6 @@
4
4
  # https://docs.microsoft.com/azure/devops/pipelines/languages/ruby
5
5
  jobs:
6
6
  - template: ./ci-jobs/functional_test.yml
7
- - job: Run_unit_tests_on_Windows_environment
8
- pool:
9
- vmImage: 'vs2017-win2016'
10
- variables:
11
- UNIT_TEST: true
12
- steps:
13
- - task: UseRubyVersion@0
14
- inputs:
15
- versionSpec: '2.5'
16
- - script: gem install bundler ffi:1.10.0
17
- displayName: 'Gem install bundler and ffi for Windows environment'
18
- - script: bundle install --retry=3 --jobs=4
19
- displayName: 'Call bundle install'
20
- - script: gem uninstall --force eventmachine && gem install eventmachine --platform ruby
21
- displayName: 'bundle re-install eventmachine for Windows because of Windows environment issue'
22
- - script: parallel_test test/unit/ -n 4
23
- displayName: 'Run parallel_test test/unit/ -n 4'
24
- - template: ./ci-jobs/functional/publish_test_result.yml
25
- parameters:
26
- xcodeVersion: 'Run_unit_tests_on_Windows_environment'
27
7
 
28
8
  # Runs tests nightly to make sure they works against appium@beta
29
9
  schedules:
@@ -3,7 +3,7 @@ steps:
3
3
  condition: always()
4
4
  inputs:
5
5
  testResultsFiles: 'test/reports/TEST-AppiumLibCoreTest*.xml'
6
- testRunTitle: ${{ parameters.title }}
6
+ testRunTitle: '$(Agent.JobName)'
7
7
  - task: ArchiveFiles@2
8
8
  condition: always()
9
9
  inputs:
@@ -15,4 +15,4 @@ steps:
15
15
  condition: always()
16
16
  inputs:
17
17
  pathtoPublish: '$(Build.ArtifactStagingDirectory)'
18
- artifactName: 'test reports'
18
+ artifactName: '$(Agent.JobName)'
@@ -12,7 +12,9 @@ steps:
12
12
  - task: UseRubyVersion@0
13
13
  inputs:
14
14
  versionSpec: '2.4' # so far, bundler does not work over 2.5 since it raises openssl error
15
- - script: nohup appium --relaxed-security &
15
+ - script: |
16
+ mkdir -p test/report
17
+ nohup appium --relaxed-security --log-timestamp --log-no-colors > test/report/appium.out 2>&1 &
16
18
  displayName: Run Appium in background
17
19
  - script: |
18
20
  gem install bundler;
@@ -18,7 +18,7 @@ echo ${ANDROID_HOME}/emulator/emulator -list-avds
18
18
  echo "Starting emulator"
19
19
 
20
20
  # Start emulator in background
21
- nohup ${ANDROID_HOME}/emulator/emulator -avd testemulator -no-boot-anim -no-snapshot > /dev/null 2>&1 &
21
+ nohup ${ANDROID_HOME}/emulator/emulator -avd testemulator -accel auto -no-boot-anim -no-snapshot > /dev/null 2>&1 &
22
22
  ${ANDROID_HOME}/platform-tools/adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed | tr -d '\r') ]]; do sleep 1; done; input keyevent 82'
23
23
 
24
24
  ${ANDROID_HOME}/platform-tools/adb devices
@@ -2,13 +2,15 @@
2
2
  parameters:
3
3
  vmImage: 'macOS-10.15'
4
4
  vmImageForIOS: 'macOS-10.15' # Not sure the reason, but macOS 10.14 instance raises no info.plist error
5
- xcodeForIOS: 11.3
6
- xcodeForTVOS: 11.3
7
- androidSDK: 29
5
+ xcodeForIOS: 11.5
6
+ xcodeForTVOS: 11.5
7
+ androidSDK: 30
8
+ androidBuildToolsVersion: '28.0.3'
8
9
  appiumVersion: 'beta'
9
10
  ignoreVersionSkip: true
10
11
  CI: true
11
12
 
13
+
12
14
  jobs:
13
15
  # Run unit tests on different Node versions
14
16
  - job: func_test_ios_base
@@ -24,10 +26,8 @@ jobs:
24
26
  xcodeVersion: ${{ parameters.xcodeForIOS }}
25
27
  - template: ./functional/run_appium.yml
26
28
  - script: bundle exec rake test:func:ios TESTS=test/functional/ios/driver_test.rb,test/functional/ios/patch_test.rb
27
- displayName: Run tests
29
+ displayName: Run tests func_test_ios_base
28
30
  - template: ./functional/publish_test_result.yml
29
- parameters:
30
- xcodeVersion: 'Run_func_test_on_iOS'
31
31
 
32
32
  - job: func_test_ios_webdriver1
33
33
  pool:
@@ -42,10 +42,8 @@ jobs:
42
42
  xcodeVersion: ${{ parameters.xcodeForIOS }}
43
43
  - template: ./functional/run_appium.yml
44
44
  - script: bundle exec rake test:func:ios TESTS=test/functional/ios/webdriver/create_session_test.rb,test/functional/ios/webdriver/w3c_actions_test.rb
45
- displayName: Run tests
45
+ displayName: Run tests func_test_ios_webdriver1
46
46
  - template: ./functional/publish_test_result.yml
47
- parameters:
48
- xcodeVersion: 'Run_func_test_on_iOS_webdriver1'
49
47
 
50
48
  - job: func_test_ios_webdriver2
51
49
  pool:
@@ -60,10 +58,8 @@ jobs:
60
58
  xcodeVersion: ${{ parameters.xcodeForIOS }}
61
59
  - template: ./functional/run_appium.yml
62
60
  - script: bundle exec rake test:func:ios TESTS=test/functional/ios/webdriver/device_test.rb
63
- displayName: Run tests
61
+ displayName: Run tests func_test_ios_webdriver2
64
62
  - template: ./functional/publish_test_result.yml
65
- parameters:
66
- xcodeVersion: 'Run_func_test_on_iOS_webdriver2'
67
63
 
68
64
  - job: func_test_ios_ios1
69
65
  pool:
@@ -78,10 +74,8 @@ jobs:
78
74
  xcodeVersion: ${{ parameters.xcodeForIOS }}
79
75
  - template: ./functional/run_appium.yml
80
76
  - script: bundle exec rake test:func:ios TESTS=test/functional/ios/ios/device_test.rb
81
- displayName: Run tests
77
+ displayName: Run tests func_test_ios_ios1
82
78
  - template: ./functional/publish_test_result.yml
83
- parameters:
84
- xcodeVersion: 'Run_func_test_on_iOS_ios1'
85
79
 
86
80
  - job: func_test_ios_ios2
87
81
  pool:
@@ -96,10 +90,8 @@ jobs:
96
90
  xcodeVersion: ${{ parameters.xcodeForIOS }}
97
91
  - template: ./functional/run_appium.yml
98
92
  - script: bundle exec rake test:func:ios TESTS=test/functional/ios/ios/device_wda_attachment_test.rb,test/functional/ios/ios/search_context_test.rb
99
- displayName: Run tests
93
+ displayName: Run tests func_test_ios_ios2
100
94
  - template: ./functional/publish_test_result.yml
101
- parameters:
102
- xcodeVersion: 'Run_func_test_on_iOS_ios2'
103
95
 
104
96
  - job: func_test_ios_ios3
105
97
  pool:
@@ -116,10 +108,8 @@ jobs:
116
108
  displayName: Install ffmpeg and applesimutils
117
109
  - template: ./functional/run_appium.yml
118
110
  - script: bundle exec rake test:func:ios TESTS=test/functional/ios/ios/mjpeg_server_test.rb,test/functional/ios/ios/mobile_commands_test.rb
119
- displayName: Run tests
111
+ displayName: Run tests func_test_ios_ios3
120
112
  - template: ./functional/publish_test_result.yml
121
- parameters:
122
- xcodeVersion: 'Run_func_test_on_iOS_ios3'
123
113
 
124
114
  - job: func_test_ios_tvos
125
115
  pool:
@@ -134,10 +124,8 @@ jobs:
134
124
  xcodeVersion: ${{ parameters.xcodeForTVOS }}
135
125
  - template: ./functional/run_appium.yml
136
126
  - script: bundle exec rake test:func:ios TESTS=test/functional/ios/tv_driver_test.rb
137
- displayName: Run tests
127
+ displayName: Run tests func_test_ios_tvos
138
128
  - template: ./functional/publish_test_result.yml
139
- parameters:
140
- xcodeVersion: 'Run_func_test_on_iOS_tv'
141
129
 
142
130
  # Skip since opencv4nodejs fails to install on the macOS instance
143
131
  # - job: func_test_ios_opencv
@@ -157,8 +145,6 @@ jobs:
157
145
  # - script: bundle exec rake test:func:ios test/functional/ios/ios/image_comparison_test.rb
158
146
  # displayName: Run tests
159
147
  # - template: ./functional/publish_test_result.yml
160
- # parameters:
161
- # xcodeVersion: 'Run_func_test_on_iOS_opencv'
162
148
 
163
149
 
164
150
  - job: func_test_android_base
@@ -169,6 +155,7 @@ jobs:
169
155
  ANDROID_SDK_VERSION: ${{ parameters.androidSDK }}
170
156
  IGNORE_VERSION_SKIP: ${{ parameters.ignoreVersionSkip }}
171
157
  APPIUM_VERSION: ${{ parameters.appiumVersion }}
158
+ ANDROID_BUILD_TOOLS_VERSION: ${{ parameters.androidBuildToolsVersion }}
172
159
  strategy:
173
160
  matrix:
174
161
  uiautomator2:
@@ -179,10 +166,8 @@ jobs:
179
166
  - template: ./functional/android_setup.yml
180
167
  - template: ./functional/run_appium.yml
181
168
  - script: bundle exec rake test:func:android TESTS=test/functional/android/driver_test.rb,test/functional/android/patch_test.rb
182
- displayName: Run tests
169
+ displayName: Run tests func_test_android_base
183
170
  - template: ./functional/publish_test_result.yml
184
- parameters:
185
- xcodeVersion: 'Run_func_test_on_android_base'
186
171
 
187
172
  - job: func_test_android_webdriver
188
173
  pool:
@@ -192,6 +177,7 @@ jobs:
192
177
  ANDROID_SDK_VERSION: ${{ parameters.androidSDK }}
193
178
  IGNORE_VERSION_SKIP: ${{ parameters.ignoreVersionSkip }}
194
179
  APPIUM_VERSION: ${{ parameters.appiumVersion }}
180
+ ANDROID_BUILD_TOOLS_VERSION: ${{ parameters.androidBuildToolsVersion }}
195
181
  strategy:
196
182
  matrix:
197
183
  uiautomator2:
@@ -202,10 +188,8 @@ jobs:
202
188
  - template: ./functional/android_setup.yml
203
189
  - template: ./functional/run_appium.yml
204
190
  - script: bundle exec rake test:func:android TESTS=test/functional/android/webdriver/create_session_test.rb,test/functional/android/webdriver/device_test.rb,test/functional/android/webdriver/w3c_actions_test.rb
205
- displayName: Run tests
191
+ displayName: Run tests func_test_android_webdriver
206
192
  - template: ./functional/publish_test_result.yml
207
- parameters:
208
- xcodeVersion: 'Run_func_test_on_android_base'
209
193
 
210
194
  - job: func_test_android_android1
211
195
  pool:
@@ -215,6 +199,7 @@ jobs:
215
199
  ANDROID_SDK_VERSION: ${{ parameters.androidSDK }}
216
200
  IGNORE_VERSION_SKIP: ${{ parameters.ignoreVersionSkip }}
217
201
  APPIUM_VERSION: ${{ parameters.appiumVersion }}
202
+ ANDROID_BUILD_TOOLS_VERSION: ${{ parameters.androidBuildToolsVersion }}
218
203
  strategy:
219
204
  matrix:
220
205
  uiautomator2:
@@ -225,10 +210,8 @@ jobs:
225
210
  - template: ./functional/android_setup.yml
226
211
  - template: ./functional/run_appium.yml
227
212
  - script: bundle exec rake test:func:android TESTS=test/functional/android/android/device_test.rb
228
- displayName: Run test/functional/android/android/device_test.rb
213
+ displayName: Run tests func_test_android_android1
229
214
  - template: ./functional/publish_test_result.yml
230
- parameters:
231
- xcodeVersion: 'func_test_android_android1'
232
215
 
233
216
  - job: func_test_android_android2
234
217
  pool:
@@ -238,6 +221,7 @@ jobs:
238
221
  ANDROID_SDK_VERSION: ${{ parameters.androidSDK }}
239
222
  IGNORE_VERSION_SKIP: ${{ parameters.ignoreVersionSkip }}
240
223
  APPIUM_VERSION: ${{ parameters.appiumVersion }}
224
+ ANDROID_BUILD_TOOLS_VERSION: ${{ parameters.androidBuildToolsVersion }}
241
225
  strategy:
242
226
  matrix:
243
227
  uiautomator2:
@@ -248,10 +232,8 @@ jobs:
248
232
  - template: ./functional/android_setup.yml
249
233
  - template: ./functional/run_appium.yml
250
234
  - script: bundle exec rake test:func:android TESTS=test/functional/android/android/mobile_commands_test.rb,test/functional/android/android/search_context_test.rb,test/functional/android/android/mjpeg_server_test.rb
251
- displayName: Run tests
235
+ displayName: Run tests func_test_android_android2
252
236
  - template: ./functional/publish_test_result.yml
253
- parameters:
254
- xcodeVersion: 'func_test_android_android3'
255
237
 
256
238
  - job: func_test_android_android3
257
239
  pool:
@@ -261,6 +243,7 @@ jobs:
261
243
  ANDROID_SDK_VERSION: ${{ parameters.androidSDK }}
262
244
  IGNORE_VERSION_SKIP: ${{ parameters.ignoreVersionSkip }}
263
245
  APPIUM_VERSION: ${{ parameters.appiumVersion }}
246
+ ANDROID_BUILD_TOOLS_VERSION: ${{ parameters.androidBuildToolsVersion }}
264
247
  strategy:
265
248
  matrix:
266
249
  uiautomator2:
@@ -271,10 +254,8 @@ jobs:
271
254
  - template: ./functional/android_setup.yml
272
255
  - template: ./functional/run_appium.yml
273
256
  - script: bundle exec rake test:func:android TESTS=test/functional/android/android/device_data_test.rb
274
- displayName: Run tests
257
+ displayName: Run tests func_test_android_android3
275
258
  - template: ./functional/publish_test_result.yml
276
- parameters:
277
- xcodeVersion: 'func_test_android_android3'
278
259
 
279
260
  - job: func_test_android_mobile_command_espresso
280
261
  pool:
@@ -285,6 +266,7 @@ jobs:
285
266
  AUTOMATION_NAME_DROID: espresso
286
267
  IGNORE_VERSION_SKIP: ${{ parameters.ignoreVersionSkip }}
287
268
  APPIUM_VERSION: ${{ parameters.appiumVersion }}
269
+ ANDROID_BUILD_TOOLS_VERSION: ${{ parameters.androidBuildToolsVersion }}
288
270
  strategy:
289
271
  matrix:
290
272
  uiautomator2:
@@ -295,10 +277,8 @@ jobs:
295
277
  - template: ./functional/android_setup.yml
296
278
  - template: ./functional/run_appium.yml
297
279
  - script: bundle exec rake test:func:android TESTS=test/functional/android/android/mobile_commands_test.rb
298
- displayName: Run tests
280
+ displayName: Run tests func_test_android_mobile_command_espresso
299
281
  - template: ./functional/publish_test_result.yml
300
- parameters:
301
- xcodeVersion: 'func_test_android_mobile_command_espresso'
302
282
 
303
283
  # Skip since opencv4nodejs fails to install on the macOS instance
304
284
  # - job: func_test_android_opencv
@@ -309,6 +289,7 @@ jobs:
309
289
  # ANDROID_SDK_VERSION: ${{ parameters.androidSDK }}
310
290
  # IGNORE_VERSION_SKIP: ${{ parameters.ignoreVersionSkip }}
311
291
  # APPIUM_VERSION: ${{ parameters.appiumVersion }}
292
+ # ANDROID_BUILD_TOOLS_VERSION: ${{ parameters.androidBuildToolsVersion }}
312
293
  # strategy:
313
294
  # matrix:
314
295
  # uiautomator2:
@@ -321,7 +302,5 @@ jobs:
321
302
  # - script: npm install -g opencv4nodejs@5.1.0
322
303
  # displayName: Install opencv4nodejs@5.1.0
323
304
  # - script: bundle exec rake test:func:android TESTS=test/functional/android/android/image_comparison_test.rb
324
- # displayName: Run tests
305
+ # displayName: Run tests func_test_android_opencv
325
306
  # - template: ./functional/publish_test_result.yml
326
- # parameters:
327
- # xcodeVersion: 'func_test_android_android2'
@@ -213,7 +213,7 @@ module Appium
213
213
  # @driver.get_performance_data package_name: package_name, data_type: data_type, data_read_timeout: 2
214
214
  #
215
215
 
216
- # @!method start_recording_screen(remote_path: nil, user: nil, pass: nil, method: 'PUT', force_restart: nil, video_size: nil, time_limit: '180', bit_rate: '4000000', bug_report: nil)
216
+ # @!method start_recording_screen(remote_path: nil, user: nil, pass: nil, method: 'PUT', file_field_name: nil, form_fields: nil, headers: nil, force_restart: nil, video_size: nil, time_limit: '180', bit_rate: '4000000', bug_report: nil)
217
217
  # @param [String] remote_path The path to the remote location, where the resulting video should be uploaded.
218
218
  # The following protocols are supported: http/https, ftp.
219
219
  # Null or empty string value (the default setting) means the content of resulting
@@ -225,6 +225,11 @@ module Appium
225
225
  # @param [String] user The name of the user for the remote authentication.
226
226
  # @param [String] pass The password for the remote authentication.
227
227
  # @param [String] method The http multipart upload method name. The 'PUT' one is used by default.
228
+ # @param [String] file_field_name The name of the form field containing the binary payload in multipart/form-data
229
+ # requests since Appium 1.18.0. Defaults to 'file'.
230
+ # @param [Array<Hash, Array<String>>] form_fields The form fields mapping in multipart/form-data requests since Appium 1.18.0.
231
+ # If any entry has the same key in this mapping, then it is going to be ignored.
232
+ # @param [Hash] headers The additional headers in multipart/form-data requests since Appium 1.18.0.
228
233
  # @param [Boolean] force_restart Whether to try to catch and upload/return the currently running screen recording
229
234
  # (+false+, the default setting on server) or ignore the result of it
230
235
  # and start a new recording immediately (+true+).
@@ -285,6 +290,19 @@ module Appium
285
290
  # @driver.finger_print 1
286
291
  #
287
292
 
293
+ # @!method execute_cdp(cmd, params)
294
+ # Execute Chrome Devtools protocol commands
295
+ # https://chromedevtools.github.io/devtools-protocol
296
+ #
297
+ # @param [String] cmd The name of command
298
+ # @param [Hash] params The parameter for the command as hash.
299
+ #
300
+ # @example
301
+ #
302
+ # @driver.execute_cdp 'Page.captureScreenshot', { quality: 50, format: 'jpeg' }
303
+ # @driver.execute_cdp 'Page.getResourceTree'
304
+ #
305
+
288
306
  ####
289
307
  ## class << self
290
308
  ####
@@ -393,6 +411,15 @@ module Appium
393
411
  end
394
412
  end
395
413
 
414
+ ::Appium::Core::Device.add_endpoint_method(:execute_cdp) do
415
+ # SeleniumWebdriver could already define this method
416
+ return if method_defined? :execute_cdp
417
+
418
+ def execute_cdp(cmd, **params)
419
+ execute :chrome_send_command, {}, { cmd: cmd, params: params }
420
+ end
421
+ end
422
+
396
423
  Screen.add_methods
397
424
  Performance.add_methods
398
425
  Network.add_methods
@@ -25,11 +25,13 @@ module Appium
25
25
  end
26
26
 
27
27
  ::Appium::Core::Device.add_endpoint_method(:start_recording_screen) do
28
- # rubocop:disable Metrics/ParameterLists
29
- def start_recording_screen(remote_path: nil, user: nil, pass: nil, method: 'PUT', force_restart: nil,
28
+ def start_recording_screen(remote_path: nil, user: nil, pass: nil, method: 'PUT',
29
+ file_field_name: nil, form_fields: nil, headers: nil, force_restart: nil,
30
30
  video_size: nil, time_limit: '180', bit_rate: nil, bug_report: nil)
31
31
  option = ::Appium::Core::Base::Device::ScreenRecord.new(
32
- remote_path: remote_path, user: user, pass: pass, method: method, force_restart: force_restart
32
+ remote_path: remote_path, user: user, pass: pass, method: method,
33
+ file_field_name: file_field_name, form_fields: form_fields, headers: headers,
34
+ force_restart: force_restart
33
35
  ).upload_option
34
36
 
35
37
  option[:videoSize] = video_size unless video_size.nil?
@@ -44,7 +46,6 @@ module Appium
44
46
 
45
47
  execute(:start_recording_screen, {}, { options: option })
46
48
  end
47
- # rubocop:enable Metrics/ParameterLists
48
49
  end
49
50
  end
50
51
  end # module Screen
@@ -12,12 +12,20 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ require 'securerandom'
16
+
15
17
  require_relative '../../version'
16
18
 
17
19
  module Appium
18
20
  module Core
19
21
  class Base
20
22
  module Http
23
+ module RequestHeaders
24
+ KEYS = {
25
+ idempotency: 'X-Idempotency-Key'
26
+ }.freeze
27
+ end
28
+
21
29
  class Default < Selenium::WebDriver::Remote::Http::Default
22
30
  DEFAULT_HEADERS = {
23
31
  'Accept' => CONTENT_TYPE,
@@ -26,6 +34,14 @@ module Appium
26
34
  "appium/ruby_lib_core/#{VERSION} (#{::Selenium::WebDriver::Remote::Http::Common::DEFAULT_HEADERS['User-Agent']})"
27
35
  }.freeze
28
36
 
37
+ attr_reader :additional_headers
38
+
39
+ def initialize(open_timeout: nil, read_timeout: nil)
40
+ @open_timeout = open_timeout
41
+ @read_timeout = read_timeout
42
+ @additional_headers = {}
43
+ end
44
+
29
45
  # Update <code>server_url</code> provided when ruby_lib _core created a default http client.
30
46
  # Set <code>@http</code> as nil to re-create http client for the <code>server_url</code>
31
47
  #
@@ -65,19 +81,20 @@ module Appium
65
81
  def call(verb, url, command_hash)
66
82
  url = server_url.merge(url) unless url.is_a?(URI)
67
83
  headers = DEFAULT_HEADERS.dup
84
+ headers = headers.merge @additional_headers unless @additional_headers.empty?
68
85
  headers['Cache-Control'] = 'no-cache' if verb == :get
69
86
 
70
87
  if command_hash
71
88
  payload = JSON.generate(command_hash)
72
89
  headers['Content-Length'] = payload.bytesize.to_s if [:post, :put].include?(verb)
73
-
74
- ::Appium::Logger.info(" >>> #{url} | #{payload}")
75
- ::Appium::Logger.debug(" > #{headers.inspect}")
76
90
  elsif verb == :post
77
91
  payload = '{}'
78
92
  headers['Content-Length'] = '2'
79
93
  end
80
94
 
95
+ ::Appium::Logger.info(" >>> #{url} | #{payload}")
96
+ ::Appium::Logger.info(" > #{headers.inspect}")
97
+
81
98
  request verb, url, headers, payload
82
99
  end
83
100
  end
@@ -135,8 +135,6 @@ module Appium
135
135
  by = _set_by_from_finders(how)
136
136
  begin
137
137
  bridge.find_element_by by, what.to_s, ref
138
- rescue Selenium::WebDriver::Error::TimeOutError # will deprecate
139
- raise Selenium::WebDriver::Error::NoSuchElementError
140
138
  rescue Selenium::WebDriver::Error::TimeoutError
141
139
  raise Selenium::WebDriver::Error::NoSuchElementError
142
140
  end
@@ -152,8 +150,6 @@ module Appium
152
150
  by = _set_by_from_finders(how)
153
151
  begin
154
152
  bridge.find_elements_by by, what.to_s, ref
155
- rescue Selenium::WebDriver::Error::TimeOutError # will deprecate
156
- []
157
153
  rescue Selenium::WebDriver::Error::TimeoutError
158
154
  []
159
155
  end
@@ -94,7 +94,10 @@ module Appium
94
94
  gsm_voice: [:post, 'session/:session_id/appium/device/gsm_voice'],
95
95
  set_network_speed: [:post, 'session/:session_id/appium/device/network_speed'],
96
96
  set_power_capacity: [:post, 'session/:session_id/appium/device/power_capacity'],
97
- set_power_ac: [:post, 'session/:session_id/appium/device/power_ac']
97
+ set_power_ac: [:post, 'session/:session_id/appium/device/power_ac'],
98
+
99
+ # For chromium: https://chromium.googlesource.com/chromium/src/+/master/chrome/test/chromedriver/server/http_handler.cc
100
+ chrome_send_command: [:post, 'session/:session_id/goog/cdp/execute']
98
101
  }.freeze
99
102
 
100
103
  COMMAND_IOS = {
@@ -25,7 +25,8 @@ module Appium
25
25
 
26
26
  METHOD = %w(POST PUT).freeze
27
27
 
28
- def initialize(remote_path: nil, user: nil, pass: nil, method: 'PUT', force_restart: nil)
28
+ def initialize(remote_path: nil, user: nil, pass: nil, method: 'PUT',
29
+ file_field_name: nil, form_fields: nil, headers: nil, force_restart: nil)
29
30
  @upload_option = if remote_path.nil?
30
31
  {}
31
32
  else
@@ -36,6 +37,9 @@ module Appium
36
37
  option[:user] = user unless user.nil?
37
38
  option[:pass] = pass unless pass.nil?
38
39
  option[:method] = method
40
+ option[:fileFieldName] = file_field_name unless file_field_name.nil?
41
+ option[:formFields] = form_fields unless form_fields.nil?
42
+ option[:headers] = headers unless headers.nil?
39
43
  option
40
44
  end
41
45
 
@@ -47,9 +51,11 @@ module Appium
47
51
  end
48
52
 
49
53
  module Command
50
- def stop_recording_screen(remote_path: nil, user: nil, pass: nil, method: 'PUT')
54
+ def stop_recording_screen(remote_path: nil, user: nil, pass: nil, method: 'PUT',
55
+ file_field_name: nil, form_fields: nil, headers: nil)
51
56
  option = ::Appium::Core::Base::Device::ScreenRecord.new(
52
- remote_path: remote_path, user: user, pass: pass, method: method
57
+ remote_path: remote_path, user: user, pass: pass, method: method,
58
+ file_field_name: file_field_name, form_fields: form_fields, headers: headers
53
59
  ).upload_option
54
60
 
55
61
  params = option.empty? ? {} : { options: option }
@@ -40,7 +40,7 @@ module Appium
40
40
  :stop_recording_screen, :stop_and_save_recording_screen,
41
41
  :shake, :device_time,
42
42
  :touch_actions, :multi_touch,
43
- :execute_driver
43
+ :execute_driver, :execute_cdp
44
44
  ].each(&method(:delegate_from_appium_driver))
45
45
  end
46
46
 
@@ -34,11 +34,12 @@ module Appium
34
34
  class Options
35
35
  attr_reader :custom_url, :default_wait, :export_session, :export_session_path,
36
36
  :port, :wait_timeout, :wait_interval, :listener,
37
- :direct_connect
37
+ :direct_connect, :enable_idempotency_header
38
38
 
39
39
  def initialize(appium_lib_opts)
40
40
  @custom_url = appium_lib_opts.fetch :server_url, nil
41
41
  @default_wait = appium_lib_opts.fetch :wait, Driver::DEFAULT_IMPLICIT_WAIT
42
+ @enable_idempotency_header = appium_lib_opts.fetch :enable_idempotency_header, true
42
43
 
43
44
  # bump current session id into a particular file
44
45
  @export_session = appium_lib_opts.fetch :export_session, false
@@ -104,6 +105,13 @@ module Appium
104
105
  # @return [Appium::Core::Base::Http::Default] the http client
105
106
  attr_reader :http_client
106
107
 
108
+ # Return if adding 'x-idempotency-key' header is enabled for each new session request.
109
+ # Following commands should not have the key.
110
+ # The key is unique for each http client instance. Defaults to <code>true</code>
111
+ # https://github.com/appium/appium-base-driver/pull/400
112
+ # @return [Bool]
113
+ attr_reader :enable_idempotency_header
114
+
107
115
  # Device type to request from the appium server
108
116
  # @return [Symbol] :android and :ios, for example
109
117
  attr_reader :device
@@ -114,11 +122,11 @@ module Appium
114
122
  attr_reader :automation_name
115
123
 
116
124
  # Custom URL for the selenium server. If set this attribute, ruby_lib_core try to handshake to the custom url.<br>
117
- # Defaults to false. Then try to connect to <code>http://127.0.0.1:#{port}/wd/hub<code>.
125
+ # Defaults to false. Then try to connect to <code>http://127.0.0.1:#{port}/wd/hub</code>.
118
126
  # @return [String]
119
127
  attr_reader :custom_url
120
128
 
121
- # Export session id to textfile in /tmp for 3rd party tools. False bu default.
129
+ # Export session id to textfile in /tmp for 3rd party tools. False by default.
122
130
  # @return [Boolean]
123
131
  attr_reader :export_session
124
132
  # @return [String] By default, session id is exported in '/tmp/appium_lib_session'
@@ -174,7 +182,9 @@ module Appium
174
182
 
175
183
  # Creates a new driver and extend particular methods
176
184
  # @param [Hash] opts A options include capabilities for the Appium Server and for the client.
177
- # @option opts [Hash] :caps Appium capabilities. Prior than :desired_capabilities
185
+ # @option opts [Hash] :caps Appium capabilities.
186
+ # @option opts [Hash] :capabilities The same as :caps.
187
+ # This param is for compatibility with Selenium WebDriver format
178
188
  # @option opts [Hash] :desired_capabilities The same as :caps.
179
189
  # This param is for compatibility with Selenium WebDriver format
180
190
  # @option opts [Appium::Core::Options] :appium_lib Capabilities affect only ruby client
@@ -187,8 +197,8 @@ module Appium
187
197
  #
188
198
  # # format 1
189
199
  # @core = Appium::Core.for caps: {...}, appium_lib: {...}
190
- # # format 2. 'desired_capabilities:' is also available instead of 'caps:'. Either is fine.
191
- # @core = Appium::Core.for url: "http://127.0.0.1:8080/wd/hub", desired_capabilities: {...}, appium_lib: {...}
200
+ # # format 2. 'capabilities:' or 'desired_capabilities:' is also available instead of 'caps:'.
201
+ # @core = Appium::Core.for url: "http://127.0.0.1:8080/wd/hub", capabilities: {...}, appium_lib: {...}
192
202
  # # format 3. 'appium_lib: {...}' can be blank
193
203
  # @core = Appium::Core.for url: "http://127.0.0.1:8080/wd/hub", desired_capabilities: {...}
194
204
  #
@@ -218,9 +228,9 @@ module Appium
218
228
  # @core.start_driver # Connect to 'http://127.0.0.1:8080/wd/hub' because of 'port: 8080'
219
229
  #
220
230
  # # Start iOS driver with .zip file over HTTP
221
- # # 'desired_capabilities:' is also available instead of 'caps:'. Either is fine.
231
+ # # 'desired_capabilities:' or 'capabilities:' is also available instead of 'caps:'. Either is fine.
222
232
  # opts = {
223
- # desired_capabilities: {
233
+ # capabilities: {
224
234
  # platformName: :ios,
225
235
  # platformVersion: '11.0',
226
236
  # deviceName: 'iPhone Simulator',
@@ -342,9 +352,17 @@ module Appium
342
352
  http_client_ops: { http_client: nil, open_timeout: 999_999, read_timeout: 999_999 })
343
353
  @custom_url ||= server_url || "http://127.0.0.1:#{@port}/wd/hub"
344
354
 
345
- create_http_client http_client: http_client_ops.delete(:http_client),
346
- open_timeout: http_client_ops.delete(:open_timeout),
347
- read_timeout: http_client_ops.delete(:read_timeout)
355
+ @http_client = get_http_client http_client: http_client_ops.delete(:http_client),
356
+ open_timeout: http_client_ops.delete(:open_timeout),
357
+ read_timeout: http_client_ops.delete(:read_timeout)
358
+
359
+ if @enable_idempotency_header
360
+ if @http_client.instance_variable_defined? :@additional_headers
361
+ @http_client.additional_headers[Appium::Core::Base::Http::RequestHeaders::KEYS[:idempotency]] = SecureRandom.uuid
362
+ else
363
+ ::Appium::Logger.warn 'No additional_headers attribute in this http client instance'
364
+ end
365
+ end
348
366
 
349
367
  begin
350
368
  # included https://github.com/SeleniumHQ/selenium/blob/43f8b3f66e7e01124eff6a5805269ee441f65707/rb/lib/selenium/webdriver/remote/driver.rb#L29
@@ -364,6 +382,11 @@ module Appium
364
382
  raise "ERROR: Unable to connect to Appium. Is the server running on #{@custom_url}?"
365
383
  end
366
384
 
385
+ if @http_client.instance_variable_defined? :@additional_headers
386
+ # We only need the key for a new session request. Should remove it for other following commands.
387
+ @http_client.additional_headers.delete Appium::Core::Base::Http::RequestHeaders::KEYS[:idempotency]
388
+ end
389
+
367
390
  # If "automationName" is set only server side, this method set "automationName" attribute into @automation_name.
368
391
  # Since @automation_name is set only client side before start_driver is called.
369
392
  set_automation_name_if_nil
@@ -375,12 +398,14 @@ module Appium
375
398
 
376
399
  private
377
400
 
378
- def create_http_client(http_client: nil, open_timeout: nil, read_timeout: nil)
379
- @http_client = http_client || Appium::Core::Base::Http::Default.new
401
+ def get_http_client(http_client: nil, open_timeout: nil, read_timeout: nil)
402
+ client = http_client || Appium::Core::Base::Http::Default.new
380
403
 
381
404
  # open_timeout and read_timeout are explicit wait.
382
- @http_client.open_timeout = open_timeout if open_timeout
383
- @http_client.read_timeout = read_timeout if read_timeout
405
+ client.open_timeout = open_timeout if open_timeout
406
+ client.read_timeout = read_timeout if read_timeout
407
+
408
+ client
384
409
  end
385
410
 
386
411
  # Ignore setting default wait if the target driver has no implementation
@@ -518,7 +543,10 @@ module Appium
518
543
  def validate_keys(opts)
519
544
  flatten_ops = flatten_hash_keys(opts)
520
545
 
521
- raise Error::NoCapabilityError unless opts.member?(:caps) || opts.member?(:desired_capabilities)
546
+ # FIXME: Remove 'desired_capabilities' in the next major Selenium update
547
+ unless opts.member?(:caps) || opts.member?(:capabilities) || opts.member?(:desired_capabilities)
548
+ raise Error::NoCapabilityError
549
+ end
522
550
 
523
551
  if !opts.member?(:appium_lib) && flatten_ops.member?(:appium_lib)
524
552
  raise Error::CapabilityStructureError, 'Please check the value of appium_lib in the capability'
@@ -539,7 +567,8 @@ module Appium
539
567
 
540
568
  # @private
541
569
  def get_caps(opts)
542
- Core::Base::Capabilities.create_capabilities(opts[:caps] || opts[:desired_capabilities] || {})
570
+ # FIXME: Remove 'desired_capabilities' in the next major Selenium update
571
+ Core::Base::Capabilities.create_capabilities(opts[:caps] || opts[:capabilities] || opts[:desired_capabilities] || {})
543
572
  end
544
573
 
545
574
  # @private
@@ -570,6 +599,7 @@ module Appium
570
599
  opts = Options.new appium_lib_opts
571
600
 
572
601
  @custom_url ||= opts.custom_url # Keep existence capability if it's already provided
602
+ @enable_idempotency_header = opts.enable_idempotency_header
573
603
 
574
604
  @default_wait = opts.default_wait
575
605
 
@@ -51,7 +51,7 @@ module Appium
51
51
  #
52
52
 
53
53
  # @since Appium 1.9.1
54
- # @!method start_recording_screen(remote_path: nil, user: nil, pass: nil, method: nil, force_restart: nil, video_type: 'mjpeg', video_fps: nil, time_limit: '180', video_quality: 'medium', video_scale: nil, video_filters: nil, pixel_format: nil)
54
+ # @!method start_recording_screen(remote_path: nil, user: nil, pass: nil, method: 'PUT', file_field_name: nil, form_fields: nil, headers: nil, force_restart: nil, video_type: 'mjpeg', video_fps: nil, time_limit: '180', video_quality: nil, video_scale: nil, video_filters: nil, pixel_format: nil)
55
55
  #
56
56
  # Record the display of devices running iOS Simulator since Xcode 9 or real devices since iOS 11
57
57
  # (ffmpeg utility is required: 'brew install ffmpeg').
@@ -68,6 +68,11 @@ module Appium
68
68
  # @param [String] user The name of the user for the remote authentication.
69
69
  # @param [String] pass The password for the remote authentication.
70
70
  # @param [String] method The http multipart upload method name. The 'PUT' one is used by default.
71
+ # @param [String] file_field_name The name of the form field containing the binary payload in multipart/form-data
72
+ # requests since Appium 1.18.0. Defaults to 'file'.
73
+ # @param [Array<Hash, Array<String>>] form_fields The form fields mapping in multipart/form-data requests since Appium 1.18.0.
74
+ # If any entry has the same key in this mapping, then it is going to be ignored.
75
+ # @param [Hash] headers The additional headers in multipart/form-data requests since Appium 1.18.0.
71
76
  # @param [Boolean] force_restart Whether to try to catch and upload/return the currently running screen recording
72
77
  # (+false+, the default setting on server) or ignore the result of it
73
78
  # and start a new recording immediately (+true+).
@@ -32,9 +32,11 @@ module Appium
32
32
 
33
33
  ::Appium::Core::Device.add_endpoint_method(:get_performance_record) do
34
34
  def get_performance_record(save_file_path: './performance', profile_name: 'Activity Monitor',
35
- remote_path: nil, user: nil, pass: nil, method: 'PUT')
35
+ remote_path: nil, user: nil, pass: nil, method: 'PUT',
36
+ file_field_name: nil, form_fields: nil, headers: nil)
36
37
  option = ::Appium::Core::Base::Device::ScreenRecord.new(
37
- remote_path: remote_path, user: user, pass: pass, method: method
38
+ remote_path: remote_path, user: user, pass: pass, method: method,
39
+ file_field_name: file_field_name, form_fields: form_fields, headers: headers
38
40
  ).upload_option
39
41
 
40
42
  option[:profileName] = profile_name
@@ -20,18 +20,20 @@ module Appium
20
20
  module Screen
21
21
  def self.add_methods
22
22
  ::Appium::Core::Device.add_endpoint_method(:start_recording_screen) do
23
- # rubocop:disable Metrics/ParameterLists
24
- def start_recording_screen(remote_path: nil, user: nil, pass: nil, method: 'PUT', force_restart: nil,
25
- video_type: 'mjpeg', time_limit: '180', video_quality: 'medium',
23
+ def start_recording_screen(remote_path: nil, user: nil, pass: nil, method: 'PUT',
24
+ file_field_name: nil, form_fields: nil, headers: nil, force_restart: nil,
25
+ video_type: 'mjpeg', time_limit: '180', video_quality: nil,
26
26
  video_fps: nil, video_scale: nil, video_filters: nil, pixel_format: nil)
27
27
  option = ::Appium::Core::Base::Device::ScreenRecord.new(
28
- remote_path: remote_path, user: user, pass: pass, method: method, force_restart: force_restart
28
+ remote_path: remote_path, user: user, pass: pass, method: method,
29
+ file_field_name: file_field_name, form_fields: form_fields, headers: headers,
30
+ force_restart: force_restart
29
31
  ).upload_option
30
32
 
31
33
  option[:videoType] = video_type
32
34
  option[:timeLimit] = time_limit
33
- option[:videoQuality] = video_quality
34
35
 
36
+ option[:videoQuality] = video_quality unless video_quality.nil?
35
37
  option[:videoFps] = video_fps unless video_fps.nil?
36
38
  option[:videoScale] = video_scale unless video_scale.nil?
37
39
  option[:videoFilters] = video_filters unless video_filters.nil?
@@ -39,7 +41,6 @@ module Appium
39
41
 
40
42
  execute(:start_recording_screen, {}, { options: option })
41
43
  end
42
- # rubocop:enable Metrics/ParameterLists
43
44
  end
44
45
  end
45
46
  end # module Screen
@@ -14,7 +14,7 @@
14
14
 
15
15
  module Appium
16
16
  module Core
17
- VERSION = '3.6.1' unless defined? ::Appium::Core::VERSION
18
- DATE = '2020-03-16' unless defined? ::Appium::Core::DATE
17
+ VERSION = '3.10.1' unless defined? ::Appium::Core::VERSION
18
+ DATE = '2020-06-29' unless defined? ::Appium::Core::DATE
19
19
  end
20
20
  end
@@ -19,7 +19,6 @@ module Appium
19
19
  module Screen
20
20
  def self.add_methods
21
21
  ::Appium::Core::Device.add_endpoint_method(:start_recording_screen) do
22
- # rubocop:disable Metrics/ParameterLists
23
22
  def start_recording_screen(force_restart: nil, time_limit: nil,
24
23
  fps: nil, preset: nil, video_filter: nil,
25
24
  capture_clicks: nil, capture_cursor: nil, audio_input: nil)
@@ -35,7 +34,6 @@ module Appium
35
34
 
36
35
  execute(:start_recording_screen, {}, { options: option })
37
36
  end
38
- # rubocop:enable Metrics/ParameterLists
39
37
  end
40
38
  end
41
39
  end # module Screen
@@ -1,3 +1,51 @@
1
+ #### v3.10.1 2020-06-29
2
+
3
+ - [9537c61](https://github.com/appium/ruby_lib_core/commit/9537c619220177a4cac82368405fec681a5ab231) Release 3.10.1
4
+ - [3b962f5](https://github.com/appium/ruby_lib_core/commit/3b962f55cc954699e72b38c94e5a1f05c82867f9) ci: runs tests on windows host as GitHub Actions (#272)
5
+ - [f60b4f1](https://github.com/appium/ruby_lib_core/commit/f60b4f193c590d861342828bd740cefda7e96b9a) ci: remove travis (#271)
6
+ - [b1aa80d](https://github.com/appium/ruby_lib_core/commit/b1aa80dd1cc200917df9958b6274e0a82b5ffc40) ci: run unittests on GitHub Actions (#270)
7
+ - [ad90f79](https://github.com/appium/ruby_lib_core/commit/ad90f79b726aa480edf989fed2a8b00ced6c52fd) chore: Update issue templates
8
+ - [cf546a0](https://github.com/appium/ruby_lib_core/commit/cf546a0c62f815df4bb3ece4932b8033fad25ae2) ci: tune Azure (#269)
9
+ - [14e7e56](https://github.com/appium/ruby_lib_core/commit/14e7e56a2bccb4c4cc53e0b10284e3837e50a1af) ci: bump android emulator version (#268)
10
+ - [8d2cd95](https://github.com/appium/ruby_lib_core/commit/8d2cd95445d95716617c426e759e19e861ef09e2) chore: remove pry added accidentally
11
+
12
+
13
+ #### v3.10.0 2020-06-09
14
+
15
+ - [9eff959](https://github.com/appium/ruby_lib_core/commit/9eff959240effde56460c77878a24a20d047f9e9) Release 3.10.0
16
+ - [0602e2a](https://github.com/appium/ruby_lib_core/commit/0602e2ab2b332f7db8e39b7da73707a50720fadd) feat: Remove timeout deprecated (#267)
17
+
18
+
19
+ #### v3.9.0 2020-05-31
20
+
21
+ - [f306188](https://github.com/appium/ruby_lib_core/commit/f306188102222088fbd31b0b9249c6a39ddd074f) Release 3.9.0
22
+ - [30c6529](https://github.com/appium/ruby_lib_core/commit/30c65299e4dffb9a2cea8b7a11b27cfcba294707) ci: run with Xcode 11.5 (#265)
23
+ - [a10f2d1](https://github.com/appium/ruby_lib_core/commit/a10f2d15ef83e9ce7003b88ec1c0923c922974ea) feat: allow :capabilities as argument (#266)
24
+
25
+
26
+ #### v3.8.0 2020-05-17
27
+
28
+ - [8986a54](https://github.com/appium/ruby_lib_core/commit/8986a5400d6a3575b7413f15bb61de09af2ec789) Release 3.8.0
29
+ - [2379f9a](https://github.com/appium/ruby_lib_core/commit/2379f9a69b43e8c2d2b584ac1e56d3a1aea5e85b) refactor: move idempotency in driver (#264)
30
+ - [8103619](https://github.com/appium/ruby_lib_core/commit/8103619313328064df516e7094e2c8a6e1e9719c) fix: x-idempotency-key only for a new session (#263)
31
+ - [971f912](https://github.com/appium/ruby_lib_core/commit/971f912a6b4d8e28896d146939c9e5b86dd4b1e0) feat: Add options for start_recording_screen (#261)
32
+ - [11f840a](https://github.com/appium/ruby_lib_core/commit/11f840a2945b0376bb3ad762e9b2eefd0aace3b4) ci: add wait
33
+ - [4931f4e](https://github.com/appium/ruby_lib_core/commit/4931f4e318e94f9253edd649757f5c774c3404a7) ci: tweak flaky case
34
+ - [cb6ef1a](https://github.com/appium/ruby_lib_core/commit/cb6ef1a74dae7200952630076dd58af6bb9500ec) Merge branch 'master' of github.com:appium/ruby_lib_core
35
+ - [9117de2](https://github.com/appium/ruby_lib_core/commit/9117de2674f018cfe8e10d9dadc188af846e6be4) ci: relax tests for uia2
36
+
37
+
38
+ #### v3.7.0 2020-04-18
39
+
40
+ - [5ffe630](https://github.com/appium/ruby_lib_core/commit/5ffe630e670943c6f6f60c0e331cdab4685e31c7) Release 3.7.0
41
+ - [e561c8d](https://github.com/appium/ruby_lib_core/commit/e561c8db5b00f1132391f8ea79133c295d39a90b) feat: Add chrome devtools endpoints (#260)
42
+ - [73cf85f](https://github.com/appium/ruby_lib_core/commit/73cf85fd6ab5bdfb9df7833a713b8d4df3e51a70) test: add w3c send_keys action
43
+ - [b1c36fa](https://github.com/appium/ruby_lib_core/commit/b1c36fa538c145326dc50f49ab4d738478e5e0ac) fix typo
44
+ - [350ba7b](https://github.com/appium/ruby_lib_core/commit/350ba7bdafd567dabc9bd54ab1476740c6f54a20) feat: Add x idempotency header (#259)
45
+ - [94f16d8](https://github.com/appium/ruby_lib_core/commit/94f16d83909a2fb6111d281a00c0b911a00bb23c) ci: bump to Xcode 11.4 and iOS 13.4 (#257)
46
+ - [53b7191](https://github.com/appium/ruby_lib_core/commit/53b7191b89e61d11b06628d710a13dac5ca9dfaf) ci: add -accel auto
47
+
48
+
1
49
  #### v3.6.1 2020-03-16
2
50
 
3
51
  - [46a2277](https://github.com/appium/ruby_lib_core/commit/46a2277e792cc583c9978db3ebd548bfee343942) Release 3.6.1
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appium_lib_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.1
4
+ version: 3.10.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuaki MATSUO
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-16 00:00:00.000000000 Z
11
+ date: 2020-06-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selenium-webdriver
@@ -219,11 +219,12 @@ executables: []
219
219
  extensions: []
220
220
  extra_rdoc_files: []
221
221
  files:
222
+ - ".github/ISSUE_TEMPLATE/issue-report.md"
222
223
  - ".github/contributing.md"
223
224
  - ".github/issue_template.md"
225
+ - ".github/workflows/unittest.yml"
224
226
  - ".gitignore"
225
227
  - ".rubocop.yml"
226
- - ".travis.yml"
227
228
  - CHANGELOG.md
228
229
  - Gemfile
229
230
  - LICENSE.txt
@@ -1,24 +0,0 @@
1
- sudo: false
2
- cache: bundler
3
- language: ruby
4
- rvm:
5
- - 2.2
6
- - 2.3
7
- - 2.4
8
- - 2.5
9
- - 2.6
10
- - 2.7
11
-
12
- before_install:
13
- - gem update bundler
14
-
15
- script:
16
- - bundle exec rake rubocop
17
- - UNIT_TEST=true bundle exec parallel_test test/unit/ -n 4
18
- - UNIT_TEST=true AUTOMATION_NAME_DROID=espresso bundle exec parallel_test test/unit/android -n 4
19
- - UNIT_TEST=true AUTOMATION_NAME_DROID=appium AUTOMATION_NAME_IOS=appium bundle exec parallel_test test/unit -n 4
20
-
21
- notifications:
22
- email:
23
- on_success: never
24
- on_failure: never