appium_lib_core 3.7.0 → 3.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/ISSUE_TEMPLATE/issue-report.md +29 -0
- data/.github/workflows/unittest.yml +68 -0
- data/.rubocop.yml +3 -3
- data/CHANGELOG.md +63 -2
- data/README.md +1 -3
- data/appium_lib_core.gemspec +1 -1
- data/azure-pipelines.yml +0 -20
- data/ci-jobs/functional/publish_test_result.yml +2 -2
- data/ci-jobs/functional/run_appium.yml +3 -1
- data/ci-jobs/functional_test.yml +26 -47
- data/lib/appium_lib_core/android/device.rb +9 -1
- data/lib/appium_lib_core/android/device/screen.rb +5 -4
- data/lib/appium_lib_core/common/base/http_default.rb +3 -8
- data/lib/appium_lib_core/common/base/search_context.rb +0 -4
- data/lib/appium_lib_core/common/device/screen_record.rb +9 -3
- data/lib/appium_lib_core/driver.rb +37 -17
- data/lib/appium_lib_core/ios/xcuitest/device.rb +6 -1
- data/lib/appium_lib_core/ios/xcuitest/device/performance.rb +4 -2
- data/lib/appium_lib_core/ios/xcuitest/device/screen.rb +7 -6
- data/lib/appium_lib_core/version.rb +2 -2
- data/lib/appium_lib_core/windows/device/screen.rb +0 -2
- data/release_notes.md +48 -0
- metadata +7 -6
- data/.travis.yml +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4dd7162d340f5712d5ecef7ef6061f8b19d1ad66d528a674563b3eb315de066b
|
4
|
+
data.tar.gz: 024f6ac6c493595db8251eca602e5a1976376364f84225b6c1cb8e69ca97550d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 26086370c36d9d98676a78e42c831bb91040d4024ecb6059a49e27b185aaa669f0b1d5fcccce8702f78d44b93436ea26c86ff92065e42d2783fed9d46e338909
|
7
|
+
data.tar.gz: 7545b8db05d2259a7efc56ec3baf7fbc3b5a25929f11e6d80c951fe0005c690af51fca4f07bd2c178bf3cdfe00508a596fe56e467f7b4e678cd2c28c70369ba8
|
@@ -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
|
data/.rubocop.yml
CHANGED
@@ -11,11 +11,11 @@ Metrics/ClassLength:
|
|
11
11
|
Metrics/AbcSize:
|
12
12
|
Enabled: false
|
13
13
|
Metrics/CyclomaticComplexity:
|
14
|
-
Max:
|
14
|
+
Max: 14
|
15
15
|
Metrics/PerceivedComplexity:
|
16
|
-
Max:
|
16
|
+
Max: 14
|
17
17
|
Metrics/ParameterLists:
|
18
|
-
|
18
|
+
Enabled: false
|
19
19
|
Lint/NestedMethodDefinition:
|
20
20
|
Enabled: false
|
21
21
|
# TODO: Replace <<- with <<~ after dropping Ruby 2.2
|
data/CHANGELOG.md
CHANGED
@@ -10,12 +10,73 @@ Read `release_notes.md` for commit level details.
|
|
10
10
|
|
11
11
|
### Deprecations
|
12
12
|
|
13
|
+
## [3.11.0] - 2020-08-01
|
14
|
+
|
15
|
+
### Enhancements
|
16
|
+
- Security update [GHSA-2v5c-755p-p4gv](https://github.com/advisories/GHSA-2v5c-755p-p4gv)
|
17
|
+
- Affects only _::Appium::Core::WebSocket_
|
18
|
+
|
19
|
+
### Bug fixes
|
20
|
+
|
21
|
+
### Deprecations
|
22
|
+
|
23
|
+
## [3.10.1] - 2020-06-29
|
24
|
+
|
25
|
+
### Enhancements
|
26
|
+
|
27
|
+
### Bug fixes
|
28
|
+
- Fix duplication warning of `execute_cdp`
|
29
|
+
|
30
|
+
### Deprecations
|
31
|
+
|
32
|
+
## [3.10.0] - 2020-06-09
|
33
|
+
|
34
|
+
### Enhancements
|
35
|
+
- Remove deprecated `Selenium::WebDriver::Error::TimeOutError`
|
36
|
+
|
37
|
+
### Bug fixes
|
38
|
+
|
39
|
+
### Deprecations
|
40
|
+
|
41
|
+
## [3.9.0] - 2020-05-31
|
42
|
+
|
43
|
+
### Enhancements
|
44
|
+
- `capabilities:` is available in addition to `desired_capabilities:` and `caps:` as a capability
|
45
|
+
```ruby
|
46
|
+
# case 1
|
47
|
+
opts = { caps: { }, appium_lib: { } }
|
48
|
+
@driver = Appium::Core.for(opts).start_driver
|
49
|
+
|
50
|
+
# case 2
|
51
|
+
opts = { capabilities: { }, appium_lib: { } }
|
52
|
+
@driver = Appium::Core.for(opts).start_driver
|
53
|
+
|
54
|
+
# case 3
|
55
|
+
opts = { desired_capabilities: { }, appium_lib: { } }
|
56
|
+
@driver = Appium::Core.for(opts).start_driver
|
57
|
+
```
|
58
|
+
|
59
|
+
### Bug fixes
|
60
|
+
|
61
|
+
### Deprecations
|
62
|
+
|
63
|
+
## [3.8.0] - 2020-05-17
|
64
|
+
|
65
|
+
### Enhancements
|
66
|
+
- Add options for `start_recording_screen`
|
67
|
+
- `file_field_name`, `form_fields` and `headers` are available since Appium 1.18.0
|
68
|
+
|
69
|
+
### Bug fixes
|
70
|
+
- Fix `x-idempotency-key` header to add it only in new session request (https://github.com/appium/ruby_lib_core/issues/262)
|
71
|
+
|
72
|
+
### Deprecations
|
73
|
+
|
13
74
|
## [3.7.0] - 2020-04-18
|
14
75
|
|
15
76
|
### Enhancements
|
16
77
|
- Add `x-idempotency-key` header support (https://github.com/appium/appium-base-driver/pull/400)
|
17
78
|
- Can disable the header with `enable_idempotency_header: false` in `appium_lib` capability. Defaults to `true`.
|
18
|
-
- Add chrome devtools endpoint which is available chrome module in Selenium Ruby binding
|
79
|
+
- Add chrome devtools endpoint which is available chrome module in Selenium Ruby binding
|
19
80
|
- https://github.com/appium/appium-base-driver/pull/405
|
20
81
|
|
21
82
|
### Bug fixes
|
@@ -107,7 +168,7 @@ Read `release_notes.md` for commit level details.
|
|
107
168
|
|
108
169
|
### Enhancements
|
109
170
|
- Add `execute_driver` to run a batch script
|
110
|
-
- It requires Appium version which has `execute_driver` support
|
171
|
+
- It requires Appium version which has `execute_driver` support
|
111
172
|
|
112
173
|
### Bug fixes
|
113
174
|
|
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
|
-
|
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
|
|
data/appium_lib_core.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.require_paths = ['lib']
|
24
24
|
|
25
25
|
spec.add_runtime_dependency 'selenium-webdriver', '~> 3.14', '>= 3.14.1'
|
26
|
-
spec.add_runtime_dependency 'faye-websocket', '~> 0.
|
26
|
+
spec.add_runtime_dependency 'faye-websocket', '~> 0.11.0'
|
27
27
|
|
28
28
|
spec.add_development_dependency 'bundler', '>= 1.14'
|
29
29
|
spec.add_development_dependency 'rake', '~> 13.0'
|
data/azure-pipelines.yml
CHANGED
@@ -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: $
|
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: '
|
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:
|
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;
|
data/ci-jobs/functional_test.yml
CHANGED
@@ -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.
|
6
|
-
xcodeForTVOS: 11.
|
7
|
-
androidSDK:
|
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
|
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+).
|
@@ -407,6 +412,9 @@ module Appium
|
|
407
412
|
end
|
408
413
|
|
409
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
|
+
|
410
418
|
def execute_cdp(cmd, **params)
|
411
419
|
execute :chrome_send_command, {}, { cmd: cmd, params: params }
|
412
420
|
end
|
@@ -25,11 +25,13 @@ module Appium
|
|
25
25
|
end
|
26
26
|
|
27
27
|
::Appium::Core::Device.add_endpoint_method(:start_recording_screen) do
|
28
|
-
|
29
|
-
|
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,
|
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
|
@@ -34,17 +34,12 @@ module Appium
|
|
34
34
|
"appium/ruby_lib_core/#{VERSION} (#{::Selenium::WebDriver::Remote::Http::Common::DEFAULT_HEADERS['User-Agent']})"
|
35
35
|
}.freeze
|
36
36
|
|
37
|
-
|
37
|
+
attr_reader :additional_headers
|
38
38
|
|
39
|
-
def initialize(open_timeout: nil, read_timeout: nil
|
39
|
+
def initialize(open_timeout: nil, read_timeout: nil)
|
40
40
|
@open_timeout = open_timeout
|
41
41
|
@read_timeout = read_timeout
|
42
|
-
|
43
|
-
@additional_headers = if enable_idempotency_header
|
44
|
-
{ RequestHeaders::KEYS[:idempotency] => SecureRandom.uuid }
|
45
|
-
else
|
46
|
-
{}
|
47
|
-
end
|
42
|
+
@additional_headers = {}
|
48
43
|
end
|
49
44
|
|
50
45
|
# Update <code>server_url</code> provided when ruby_lib _core created a default http client.
|
@@ -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
|
@@ -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',
|
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 }
|
@@ -105,7 +105,8 @@ module Appium
|
|
105
105
|
# @return [Appium::Core::Base::Http::Default] the http client
|
106
106
|
attr_reader :http_client
|
107
107
|
|
108
|
-
# Return if adding 'x-idempotency-key' header is each request.
|
108
|
+
# Return if adding 'x-idempotency-key' header is enabled for each new session request.
|
109
|
+
# Following commands should not have the key.
|
109
110
|
# The key is unique for each http client instance. Defaults to <code>true</code>
|
110
111
|
# https://github.com/appium/appium-base-driver/pull/400
|
111
112
|
# @return [Bool]
|
@@ -181,7 +182,9 @@ module Appium
|
|
181
182
|
|
182
183
|
# Creates a new driver and extend particular methods
|
183
184
|
# @param [Hash] opts A options include capabilities for the Appium Server and for the client.
|
184
|
-
# @option opts [Hash] :caps Appium 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
|
185
188
|
# @option opts [Hash] :desired_capabilities The same as :caps.
|
186
189
|
# This param is for compatibility with Selenium WebDriver format
|
187
190
|
# @option opts [Appium::Core::Options] :appium_lib Capabilities affect only ruby client
|
@@ -194,8 +197,8 @@ module Appium
|
|
194
197
|
#
|
195
198
|
# # format 1
|
196
199
|
# @core = Appium::Core.for caps: {...}, appium_lib: {...}
|
197
|
-
# # format 2. 'desired_capabilities:' is also available instead of 'caps:'.
|
198
|
-
# @core = Appium::Core.for url: "http://127.0.0.1:8080/wd/hub",
|
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: {...}
|
199
202
|
# # format 3. 'appium_lib: {...}' can be blank
|
200
203
|
# @core = Appium::Core.for url: "http://127.0.0.1:8080/wd/hub", desired_capabilities: {...}
|
201
204
|
#
|
@@ -225,9 +228,9 @@ module Appium
|
|
225
228
|
# @core.start_driver # Connect to 'http://127.0.0.1:8080/wd/hub' because of 'port: 8080'
|
226
229
|
#
|
227
230
|
# # Start iOS driver with .zip file over HTTP
|
228
|
-
# # '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.
|
229
232
|
# opts = {
|
230
|
-
#
|
233
|
+
# capabilities: {
|
231
234
|
# platformName: :ios,
|
232
235
|
# platformVersion: '11.0',
|
233
236
|
# deviceName: 'iPhone Simulator',
|
@@ -349,9 +352,17 @@ module Appium
|
|
349
352
|
http_client_ops: { http_client: nil, open_timeout: 999_999, read_timeout: 999_999 })
|
350
353
|
@custom_url ||= server_url || "http://127.0.0.1:#{@port}/wd/hub"
|
351
354
|
|
352
|
-
|
353
|
-
|
354
|
-
|
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
|
355
366
|
|
356
367
|
begin
|
357
368
|
# included https://github.com/SeleniumHQ/selenium/blob/43f8b3f66e7e01124eff6a5805269ee441f65707/rb/lib/selenium/webdriver/remote/driver.rb#L29
|
@@ -371,6 +382,11 @@ module Appium
|
|
371
382
|
raise "ERROR: Unable to connect to Appium. Is the server running on #{@custom_url}?"
|
372
383
|
end
|
373
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
|
+
|
374
390
|
# If "automationName" is set only server side, this method set "automationName" attribute into @automation_name.
|
375
391
|
# Since @automation_name is set only client side before start_driver is called.
|
376
392
|
set_automation_name_if_nil
|
@@ -382,14 +398,14 @@ module Appium
|
|
382
398
|
|
383
399
|
private
|
384
400
|
|
385
|
-
def
|
386
|
-
|
387
|
-
enable_idempotency_header: @enable_idempotency_header
|
388
|
-
)
|
401
|
+
def get_http_client(http_client: nil, open_timeout: nil, read_timeout: nil)
|
402
|
+
client = http_client || Appium::Core::Base::Http::Default.new
|
389
403
|
|
390
404
|
# open_timeout and read_timeout are explicit wait.
|
391
|
-
|
392
|
-
|
405
|
+
client.open_timeout = open_timeout if open_timeout
|
406
|
+
client.read_timeout = read_timeout if read_timeout
|
407
|
+
|
408
|
+
client
|
393
409
|
end
|
394
410
|
|
395
411
|
# Ignore setting default wait if the target driver has no implementation
|
@@ -527,7 +543,10 @@ module Appium
|
|
527
543
|
def validate_keys(opts)
|
528
544
|
flatten_ops = flatten_hash_keys(opts)
|
529
545
|
|
530
|
-
|
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
|
531
550
|
|
532
551
|
if !opts.member?(:appium_lib) && flatten_ops.member?(:appium_lib)
|
533
552
|
raise Error::CapabilityStructureError, 'Please check the value of appium_lib in the capability'
|
@@ -548,7 +567,8 @@ module Appium
|
|
548
567
|
|
549
568
|
# @private
|
550
569
|
def get_caps(opts)
|
551
|
-
|
570
|
+
# FIXME: Remove 'desired_capabilities' in the next major Selenium update
|
571
|
+
Core::Base::Capabilities.create_capabilities(opts[:caps] || opts[:capabilities] || opts[:desired_capabilities] || {})
|
552
572
|
end
|
553
573
|
|
554
574
|
# @private
|
@@ -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:
|
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
|
-
|
24
|
-
|
25
|
-
video_type: 'mjpeg', time_limit: '180', video_quality:
|
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,
|
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.
|
18
|
-
DATE = '2020-
|
17
|
+
VERSION = '3.11.0' unless defined? ::Appium::Core::VERSION
|
18
|
+
DATE = '2020-08-01' 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
|
data/release_notes.md
CHANGED
@@ -1,3 +1,51 @@
|
|
1
|
+
#### v3.11.0 2020-08-01
|
2
|
+
|
3
|
+
- [0ed888e](https://github.com/appium/ruby_lib_core/commit/0ed888efd87def79cdb1ca922268b466485a2261) Release 3.11.0
|
4
|
+
- [f7dc534](https://github.com/appium/ruby_lib_core/commit/f7dc5349a48ac305df740f7be1f6e5f9b90e1e0e) chore: update faye-websocket (#279)
|
5
|
+
- [2fa2440](https://github.com/appium/ruby_lib_core/commit/2fa24404aa993c643191a2de0f8c2c800680ec5f) test: tweak espresso (#278)
|
6
|
+
- [ba7f71d](https://github.com/appium/ruby_lib_core/commit/ba7f71d82393b75d7119dbb50f8c0ae781d0933e) ci: revert
|
7
|
+
- [c2cf5d7](https://github.com/appium/ruby_lib_core/commit/c2cf5d7ef04c51e0b978676ea5145223f1b16f2e) test: add allOf example (#274)
|
8
|
+
- [f7c21b8](https://github.com/appium/ruby_lib_core/commit/f7c21b878ac9970f6d621deedf4c9adce7515700) ci: tweak version
|
9
|
+
- [2162392](https://github.com/appium/ruby_lib_core/commit/2162392bfa5cc949aae9b4020d6b53b7b23953f9) ci: specify which beta (#273)
|
10
|
+
|
11
|
+
|
12
|
+
#### v3.10.1 2020-06-29
|
13
|
+
|
14
|
+
- [9537c61](https://github.com/appium/ruby_lib_core/commit/9537c619220177a4cac82368405fec681a5ab231) Release 3.10.1
|
15
|
+
- [3b962f5](https://github.com/appium/ruby_lib_core/commit/3b962f55cc954699e72b38c94e5a1f05c82867f9) ci: runs tests on windows host as GitHub Actions (#272)
|
16
|
+
- [f60b4f1](https://github.com/appium/ruby_lib_core/commit/f60b4f193c590d861342828bd740cefda7e96b9a) ci: remove travis (#271)
|
17
|
+
- [b1aa80d](https://github.com/appium/ruby_lib_core/commit/b1aa80dd1cc200917df9958b6274e0a82b5ffc40) ci: run unittests on GitHub Actions (#270)
|
18
|
+
- [ad90f79](https://github.com/appium/ruby_lib_core/commit/ad90f79b726aa480edf989fed2a8b00ced6c52fd) chore: Update issue templates
|
19
|
+
- [cf546a0](https://github.com/appium/ruby_lib_core/commit/cf546a0c62f815df4bb3ece4932b8033fad25ae2) ci: tune Azure (#269)
|
20
|
+
- [14e7e56](https://github.com/appium/ruby_lib_core/commit/14e7e56a2bccb4c4cc53e0b10284e3837e50a1af) ci: bump android emulator version (#268)
|
21
|
+
- [8d2cd95](https://github.com/appium/ruby_lib_core/commit/8d2cd95445d95716617c426e759e19e861ef09e2) chore: remove pry added accidentally
|
22
|
+
|
23
|
+
|
24
|
+
#### v3.10.0 2020-06-09
|
25
|
+
|
26
|
+
- [9eff959](https://github.com/appium/ruby_lib_core/commit/9eff959240effde56460c77878a24a20d047f9e9) Release 3.10.0
|
27
|
+
- [0602e2a](https://github.com/appium/ruby_lib_core/commit/0602e2ab2b332f7db8e39b7da73707a50720fadd) feat: Remove timeout deprecated (#267)
|
28
|
+
|
29
|
+
|
30
|
+
#### v3.9.0 2020-05-31
|
31
|
+
|
32
|
+
- [f306188](https://github.com/appium/ruby_lib_core/commit/f306188102222088fbd31b0b9249c6a39ddd074f) Release 3.9.0
|
33
|
+
- [30c6529](https://github.com/appium/ruby_lib_core/commit/30c65299e4dffb9a2cea8b7a11b27cfcba294707) ci: run with Xcode 11.5 (#265)
|
34
|
+
- [a10f2d1](https://github.com/appium/ruby_lib_core/commit/a10f2d15ef83e9ce7003b88ec1c0923c922974ea) feat: allow :capabilities as argument (#266)
|
35
|
+
|
36
|
+
|
37
|
+
#### v3.8.0 2020-05-17
|
38
|
+
|
39
|
+
- [8986a54](https://github.com/appium/ruby_lib_core/commit/8986a5400d6a3575b7413f15bb61de09af2ec789) Release 3.8.0
|
40
|
+
- [2379f9a](https://github.com/appium/ruby_lib_core/commit/2379f9a69b43e8c2d2b584ac1e56d3a1aea5e85b) refactor: move idempotency in driver (#264)
|
41
|
+
- [8103619](https://github.com/appium/ruby_lib_core/commit/8103619313328064df516e7094e2c8a6e1e9719c) fix: x-idempotency-key only for a new session (#263)
|
42
|
+
- [971f912](https://github.com/appium/ruby_lib_core/commit/971f912a6b4d8e28896d146939c9e5b86dd4b1e0) feat: Add options for start_recording_screen (#261)
|
43
|
+
- [11f840a](https://github.com/appium/ruby_lib_core/commit/11f840a2945b0376bb3ad762e9b2eefd0aace3b4) ci: add wait
|
44
|
+
- [4931f4e](https://github.com/appium/ruby_lib_core/commit/4931f4e318e94f9253edd649757f5c774c3404a7) ci: tweak flaky case
|
45
|
+
- [cb6ef1a](https://github.com/appium/ruby_lib_core/commit/cb6ef1a74dae7200952630076dd58af6bb9500ec) Merge branch 'master' of github.com:appium/ruby_lib_core
|
46
|
+
- [9117de2](https://github.com/appium/ruby_lib_core/commit/9117de2674f018cfe8e10d9dadc188af846e6be4) ci: relax tests for uia2
|
47
|
+
|
48
|
+
|
1
49
|
#### v3.7.0 2020-04-18
|
2
50
|
|
3
51
|
- [5ffe630](https://github.com/appium/ruby_lib_core/commit/5ffe630e670943c6f6f60c0e331cdab4685e31c7) Release 3.7.0
|
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.
|
4
|
+
version: 3.11.0
|
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-
|
11
|
+
date: 2020-08-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selenium-webdriver
|
@@ -36,14 +36,14 @@ dependencies:
|
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: 0.
|
39
|
+
version: 0.11.0
|
40
40
|
type: :runtime
|
41
41
|
prerelease: false
|
42
42
|
version_requirements: !ruby/object:Gem::Requirement
|
43
43
|
requirements:
|
44
44
|
- - "~>"
|
45
45
|
- !ruby/object:Gem::Version
|
46
|
-
version: 0.
|
46
|
+
version: 0.11.0
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: bundler
|
49
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -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
|
@@ -339,7 +340,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
339
340
|
- !ruby/object:Gem::Version
|
340
341
|
version: '0'
|
341
342
|
requirements: []
|
342
|
-
rubygems_version: 3.
|
343
|
+
rubygems_version: 3.1.2
|
343
344
|
signing_key:
|
344
345
|
specification_version: 4
|
345
346
|
summary: Minimal Ruby library for Appium.
|
data/.travis.yml
DELETED
@@ -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
|