appium_lib_core 3.8.0 → 3.11.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 +4 -4
- data/.github/ISSUE_TEMPLATE/issue-report.md +29 -0
- data/.github/workflows/unittest.yml +68 -0
- data/.rubocop.yml +2 -2
- data/CHANGELOG.md +61 -2
- data/README.md +1 -3
- data/appium_lib_core.gemspec +2 -2
- data/azure-pipelines.yml +0 -20
- data/ci-jobs/functional/publish_test_result.yml +2 -2
- data/ci-jobs/functional/run_appium.yml +6 -1
- data/ci-jobs/functional/start-emulator.sh +1 -1
- data/ci-jobs/functional_test.yml +19 -48
- data/lib/appium_lib_core/android/device.rb +3 -0
- data/lib/appium_lib_core/common/base/search_context.rb +0 -4
- data/lib/appium_lib_core/common/device/app_management.rb +3 -3
- data/lib/appium_lib_core/driver.rb +35 -11
- data/lib/appium_lib_core/version.rb +2 -2
- data/release_notes.md +53 -0
- metadata +9 -8
- 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: 606ec257c3bb37fa6f5b56d142d261b127e23f6cfa244d12dab8b1c8b044b811
|
4
|
+
data.tar.gz: 065f78705b0a92b2779e54dde42e46c54cd7dce2d03b6959415cc24d0975779a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecff5490c095217a13e8f85d37efca1392167f704b8836d48846e79f2e3583d2c668e6102b080c7206f137b6c9f1dceb152855be8f85c8baca68351b01a93724
|
7
|
+
data.tar.gz: d69eefd63b6c2865ead8601bb5732790c1237d4f20b02379e02329cc711be82dda2a52d334d6f5e4c60faee892b49290efb91e6d4efa4e197335253a6d4b7c39
|
@@ -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
data/CHANGELOG.md
CHANGED
@@ -10,6 +10,65 @@ Read `release_notes.md` for commit level details.
|
|
10
10
|
|
11
11
|
### Deprecations
|
12
12
|
|
13
|
+
## [3.11.1] - 2020-11-20
|
14
|
+
|
15
|
+
### Enhancements
|
16
|
+
|
17
|
+
### Bug fixes
|
18
|
+
- Fix `install_app` to be able to set no args for options
|
19
|
+
|
20
|
+
### Deprecations
|
21
|
+
|
22
|
+
## [3.11.0] - 2020-08-01
|
23
|
+
|
24
|
+
### Enhancements
|
25
|
+
- Security update [GHSA-2v5c-755p-p4gv](https://github.com/advisories/GHSA-2v5c-755p-p4gv)
|
26
|
+
- Affects only _::Appium::Core::WebSocket_
|
27
|
+
|
28
|
+
### Bug fixes
|
29
|
+
|
30
|
+
### Deprecations
|
31
|
+
|
32
|
+
## [3.10.1] - 2020-06-29
|
33
|
+
|
34
|
+
### Enhancements
|
35
|
+
|
36
|
+
### Bug fixes
|
37
|
+
- Fix duplication warning of `execute_cdp`
|
38
|
+
|
39
|
+
### Deprecations
|
40
|
+
|
41
|
+
## [3.10.0] - 2020-06-09
|
42
|
+
|
43
|
+
### Enhancements
|
44
|
+
- Remove deprecated `Selenium::WebDriver::Error::TimeOutError`
|
45
|
+
|
46
|
+
### Bug fixes
|
47
|
+
|
48
|
+
### Deprecations
|
49
|
+
|
50
|
+
## [3.9.0] - 2020-05-31
|
51
|
+
|
52
|
+
### Enhancements
|
53
|
+
- `capabilities:` is available in addition to `desired_capabilities:` and `caps:` as a capability
|
54
|
+
```ruby
|
55
|
+
# case 1
|
56
|
+
opts = { caps: { }, appium_lib: { } }
|
57
|
+
@driver = Appium::Core.for(opts).start_driver
|
58
|
+
|
59
|
+
# case 2
|
60
|
+
opts = { capabilities: { }, appium_lib: { } }
|
61
|
+
@driver = Appium::Core.for(opts).start_driver
|
62
|
+
|
63
|
+
# case 3
|
64
|
+
opts = { desired_capabilities: { }, appium_lib: { } }
|
65
|
+
@driver = Appium::Core.for(opts).start_driver
|
66
|
+
```
|
67
|
+
|
68
|
+
### Bug fixes
|
69
|
+
|
70
|
+
### Deprecations
|
71
|
+
|
13
72
|
## [3.8.0] - 2020-05-17
|
14
73
|
|
15
74
|
### Enhancements
|
@@ -26,7 +85,7 @@ Read `release_notes.md` for commit level details.
|
|
26
85
|
### Enhancements
|
27
86
|
- Add `x-idempotency-key` header support (https://github.com/appium/appium-base-driver/pull/400)
|
28
87
|
- Can disable the header with `enable_idempotency_header: false` in `appium_lib` capability. Defaults to `true`.
|
29
|
-
- Add chrome devtools endpoint which is available chrome module in Selenium Ruby binding
|
88
|
+
- Add chrome devtools endpoint which is available chrome module in Selenium Ruby binding
|
30
89
|
- https://github.com/appium/appium-base-driver/pull/405
|
31
90
|
|
32
91
|
### Bug fixes
|
@@ -118,7 +177,7 @@ Read `release_notes.md` for commit level details.
|
|
118
177
|
|
119
178
|
### Enhancements
|
120
179
|
- Add `execute_driver` to run a batch script
|
121
|
-
- It requires Appium version which has `execute_driver` support
|
180
|
+
- It requires Appium version which has `execute_driver` support
|
122
181
|
|
123
182
|
### Bug fixes
|
124
183
|
|
data/README.md
CHANGED
@@ -2,9 +2,7 @@
|
|
2
2
|
|
3
3
|
[](https://badge.fury.io/rb/appium_lib_core)
|
4
4
|
|
5
|
-
|
6
|
-
|:---:|:---:|
|
7
|
-
|[](https://travis-ci.org/appium/ruby_lib_core)|[](https://dev.azure.com/kazucocoa/ruby_lib_core/_build/latest?definitionId=9&branchName=master)|
|
5
|
+
[](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,14 +23,14 @@ 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'
|
30
30
|
spec.add_development_dependency 'yard', '~> 0.9.11'
|
31
31
|
spec.add_development_dependency 'minitest', '~> 5.0'
|
32
32
|
spec.add_development_dependency 'minitest-reporters', '~> 1.1'
|
33
|
-
spec.add_development_dependency 'webmock', '~> 3.
|
33
|
+
spec.add_development_dependency 'webmock', '~> 3.10.0'
|
34
34
|
spec.add_development_dependency 'rubocop', '0.68.1'
|
35
35
|
spec.add_development_dependency 'appium_thor', '~> 1.0'
|
36
36
|
spec.add_development_dependency 'pry'
|
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,8 +12,13 @@ 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
|
19
|
+
env:
|
20
|
+
JAVA_HOME: $(JAVA_HOME_11_X64)
|
21
|
+
PATH: $(JAVA_HOME_11_X64)/bin:$(PATH)
|
17
22
|
- script: |
|
18
23
|
gem install bundler;
|
19
24
|
bundle install --retry=3 --jobs=4 --path vendor/bundle;
|
@@ -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 -accel auto -no-boot-anim -no-snapshot > /dev/null 2>&1 &
|
21
|
+
nohup ${ANDROID_HOME}/emulator/emulator -avd testemulator -accel auto -no-boot-anim -gpu auto -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
|
data/ci-jobs/functional_test.yml
CHANGED
@@ -2,13 +2,14 @@
|
|
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
8
|
appiumVersion: 'beta'
|
9
9
|
ignoreVersionSkip: true
|
10
10
|
CI: true
|
11
11
|
|
12
|
+
|
12
13
|
jobs:
|
13
14
|
# Run unit tests on different Node versions
|
14
15
|
- job: func_test_ios_base
|
@@ -24,10 +25,8 @@ jobs:
|
|
24
25
|
xcodeVersion: ${{ parameters.xcodeForIOS }}
|
25
26
|
- template: ./functional/run_appium.yml
|
26
27
|
- script: bundle exec rake test:func:ios TESTS=test/functional/ios/driver_test.rb,test/functional/ios/patch_test.rb
|
27
|
-
displayName: Run tests
|
28
|
+
displayName: Run tests func_test_ios_base
|
28
29
|
- template: ./functional/publish_test_result.yml
|
29
|
-
parameters:
|
30
|
-
xcodeVersion: 'Run_func_test_on_iOS'
|
31
30
|
|
32
31
|
- job: func_test_ios_webdriver1
|
33
32
|
pool:
|
@@ -42,10 +41,8 @@ jobs:
|
|
42
41
|
xcodeVersion: ${{ parameters.xcodeForIOS }}
|
43
42
|
- template: ./functional/run_appium.yml
|
44
43
|
- 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
|
44
|
+
displayName: Run tests func_test_ios_webdriver1
|
46
45
|
- template: ./functional/publish_test_result.yml
|
47
|
-
parameters:
|
48
|
-
xcodeVersion: 'Run_func_test_on_iOS_webdriver1'
|
49
46
|
|
50
47
|
- job: func_test_ios_webdriver2
|
51
48
|
pool:
|
@@ -60,10 +57,8 @@ jobs:
|
|
60
57
|
xcodeVersion: ${{ parameters.xcodeForIOS }}
|
61
58
|
- template: ./functional/run_appium.yml
|
62
59
|
- script: bundle exec rake test:func:ios TESTS=test/functional/ios/webdriver/device_test.rb
|
63
|
-
displayName: Run tests
|
60
|
+
displayName: Run tests func_test_ios_webdriver2
|
64
61
|
- template: ./functional/publish_test_result.yml
|
65
|
-
parameters:
|
66
|
-
xcodeVersion: 'Run_func_test_on_iOS_webdriver2'
|
67
62
|
|
68
63
|
- job: func_test_ios_ios1
|
69
64
|
pool:
|
@@ -78,10 +73,8 @@ jobs:
|
|
78
73
|
xcodeVersion: ${{ parameters.xcodeForIOS }}
|
79
74
|
- template: ./functional/run_appium.yml
|
80
75
|
- script: bundle exec rake test:func:ios TESTS=test/functional/ios/ios/device_test.rb
|
81
|
-
displayName: Run tests
|
76
|
+
displayName: Run tests func_test_ios_ios1
|
82
77
|
- template: ./functional/publish_test_result.yml
|
83
|
-
parameters:
|
84
|
-
xcodeVersion: 'Run_func_test_on_iOS_ios1'
|
85
78
|
|
86
79
|
- job: func_test_ios_ios2
|
87
80
|
pool:
|
@@ -96,10 +89,8 @@ jobs:
|
|
96
89
|
xcodeVersion: ${{ parameters.xcodeForIOS }}
|
97
90
|
- template: ./functional/run_appium.yml
|
98
91
|
- 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
|
92
|
+
displayName: Run tests func_test_ios_ios2
|
100
93
|
- template: ./functional/publish_test_result.yml
|
101
|
-
parameters:
|
102
|
-
xcodeVersion: 'Run_func_test_on_iOS_ios2'
|
103
94
|
|
104
95
|
- job: func_test_ios_ios3
|
105
96
|
pool:
|
@@ -116,10 +107,8 @@ jobs:
|
|
116
107
|
displayName: Install ffmpeg and applesimutils
|
117
108
|
- template: ./functional/run_appium.yml
|
118
109
|
- 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
|
110
|
+
displayName: Run tests func_test_ios_ios3
|
120
111
|
- template: ./functional/publish_test_result.yml
|
121
|
-
parameters:
|
122
|
-
xcodeVersion: 'Run_func_test_on_iOS_ios3'
|
123
112
|
|
124
113
|
- job: func_test_ios_tvos
|
125
114
|
pool:
|
@@ -134,10 +123,8 @@ jobs:
|
|
134
123
|
xcodeVersion: ${{ parameters.xcodeForTVOS }}
|
135
124
|
- template: ./functional/run_appium.yml
|
136
125
|
- script: bundle exec rake test:func:ios TESTS=test/functional/ios/tv_driver_test.rb
|
137
|
-
displayName: Run tests
|
126
|
+
displayName: Run tests func_test_ios_tvos
|
138
127
|
- template: ./functional/publish_test_result.yml
|
139
|
-
parameters:
|
140
|
-
xcodeVersion: 'Run_func_test_on_iOS_tv'
|
141
128
|
|
142
129
|
# Skip since opencv4nodejs fails to install on the macOS instance
|
143
130
|
# - job: func_test_ios_opencv
|
@@ -157,8 +144,6 @@ jobs:
|
|
157
144
|
# - script: bundle exec rake test:func:ios test/functional/ios/ios/image_comparison_test.rb
|
158
145
|
# displayName: Run tests
|
159
146
|
# - template: ./functional/publish_test_result.yml
|
160
|
-
# parameters:
|
161
|
-
# xcodeVersion: 'Run_func_test_on_iOS_opencv'
|
162
147
|
|
163
148
|
|
164
149
|
- job: func_test_android_base
|
@@ -179,10 +164,8 @@ jobs:
|
|
179
164
|
- template: ./functional/android_setup.yml
|
180
165
|
- template: ./functional/run_appium.yml
|
181
166
|
- script: bundle exec rake test:func:android TESTS=test/functional/android/driver_test.rb,test/functional/android/patch_test.rb
|
182
|
-
displayName: Run tests
|
167
|
+
displayName: Run tests func_test_android_base
|
183
168
|
- template: ./functional/publish_test_result.yml
|
184
|
-
parameters:
|
185
|
-
xcodeVersion: 'Run_func_test_on_android_base'
|
186
169
|
|
187
170
|
- job: func_test_android_webdriver
|
188
171
|
pool:
|
@@ -202,10 +185,8 @@ jobs:
|
|
202
185
|
- template: ./functional/android_setup.yml
|
203
186
|
- template: ./functional/run_appium.yml
|
204
187
|
- 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
|
188
|
+
displayName: Run tests func_test_android_webdriver
|
206
189
|
- template: ./functional/publish_test_result.yml
|
207
|
-
parameters:
|
208
|
-
xcodeVersion: 'Run_func_test_on_android_base'
|
209
190
|
|
210
191
|
- job: func_test_android_android1
|
211
192
|
pool:
|
@@ -225,10 +206,8 @@ jobs:
|
|
225
206
|
- template: ./functional/android_setup.yml
|
226
207
|
- template: ./functional/run_appium.yml
|
227
208
|
- script: bundle exec rake test:func:android TESTS=test/functional/android/android/device_test.rb
|
228
|
-
displayName: Run
|
209
|
+
displayName: Run tests func_test_android_android1
|
229
210
|
- template: ./functional/publish_test_result.yml
|
230
|
-
parameters:
|
231
|
-
xcodeVersion: 'func_test_android_android1'
|
232
211
|
|
233
212
|
- job: func_test_android_android2
|
234
213
|
pool:
|
@@ -247,11 +226,9 @@ jobs:
|
|
247
226
|
steps:
|
248
227
|
- template: ./functional/android_setup.yml
|
249
228
|
- template: ./functional/run_appium.yml
|
250
|
-
- script: bundle exec rake test:func:android TESTS=test/functional/android/android/
|
251
|
-
displayName: Run tests
|
229
|
+
- script: bundle exec rake test:func:android TESTS=test/functional/android/android/search_context_test.rb,test/functional/android/android/mjpeg_server_test.rb
|
230
|
+
displayName: Run tests func_test_android_android2
|
252
231
|
- template: ./functional/publish_test_result.yml
|
253
|
-
parameters:
|
254
|
-
xcodeVersion: 'func_test_android_android3'
|
255
232
|
|
256
233
|
- job: func_test_android_android3
|
257
234
|
pool:
|
@@ -271,10 +248,8 @@ jobs:
|
|
271
248
|
- template: ./functional/android_setup.yml
|
272
249
|
- template: ./functional/run_appium.yml
|
273
250
|
- script: bundle exec rake test:func:android TESTS=test/functional/android/android/device_data_test.rb
|
274
|
-
displayName: Run tests
|
251
|
+
displayName: Run tests func_test_android_android3
|
275
252
|
- template: ./functional/publish_test_result.yml
|
276
|
-
parameters:
|
277
|
-
xcodeVersion: 'func_test_android_android3'
|
278
253
|
|
279
254
|
- job: func_test_android_mobile_command_espresso
|
280
255
|
pool:
|
@@ -295,10 +270,8 @@ jobs:
|
|
295
270
|
- template: ./functional/android_setup.yml
|
296
271
|
- template: ./functional/run_appium.yml
|
297
272
|
- script: bundle exec rake test:func:android TESTS=test/functional/android/android/mobile_commands_test.rb
|
298
|
-
displayName: Run tests
|
273
|
+
displayName: Run tests func_test_android_mobile_command_espresso
|
299
274
|
- template: ./functional/publish_test_result.yml
|
300
|
-
parameters:
|
301
|
-
xcodeVersion: 'func_test_android_mobile_command_espresso'
|
302
275
|
|
303
276
|
# Skip since opencv4nodejs fails to install on the macOS instance
|
304
277
|
# - job: func_test_android_opencv
|
@@ -321,7 +294,5 @@ jobs:
|
|
321
294
|
# - script: npm install -g opencv4nodejs@5.1.0
|
322
295
|
# displayName: Install opencv4nodejs@5.1.0
|
323
296
|
# - script: bundle exec rake test:func:android TESTS=test/functional/android/android/image_comparison_test.rb
|
324
|
-
# displayName: Run tests
|
297
|
+
# displayName: Run tests func_test_android_opencv
|
325
298
|
# - template: ./functional/publish_test_result.yml
|
326
|
-
# parameters:
|
327
|
-
# xcodeVersion: 'func_test_android_android2'
|
@@ -412,6 +412,9 @@ module Appium
|
|
412
412
|
end
|
413
413
|
|
414
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
|
+
|
415
418
|
def execute_cdp(cmd, **params)
|
416
419
|
execute :chrome_send_command, {}, { cmd: cmd, params: params }
|
417
420
|
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
|
@@ -47,7 +47,7 @@ module Appium
|
|
47
47
|
grant_permissions: nil)
|
48
48
|
args = { appPath: path }
|
49
49
|
|
50
|
-
args[:options] = {}
|
50
|
+
args[:options] = {} if options?(replace, timeout, allow_test_packages, use_sdcard, grant_permissions)
|
51
51
|
|
52
52
|
args[:options][:replace] = replace unless replace.nil?
|
53
53
|
args[:options][:timeout] = timeout unless timeout.nil?
|
@@ -92,8 +92,8 @@ module Appium
|
|
92
92
|
|
93
93
|
private
|
94
94
|
|
95
|
-
def options?(
|
96
|
-
|
95
|
+
def options?(*args)
|
96
|
+
args.compact.any?
|
97
97
|
end
|
98
98
|
end # module AppManagement
|
99
99
|
end # module Device
|
@@ -182,7 +182,9 @@ module Appium
|
|
182
182
|
|
183
183
|
# Creates a new driver and extend particular methods
|
184
184
|
# @param [Hash] opts A options include capabilities for the Appium Server and for the client.
|
185
|
-
# @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
|
186
188
|
# @option opts [Hash] :desired_capabilities The same as :caps.
|
187
189
|
# This param is for compatibility with Selenium WebDriver format
|
188
190
|
# @option opts [Appium::Core::Options] :appium_lib Capabilities affect only ruby client
|
@@ -195,8 +197,8 @@ module Appium
|
|
195
197
|
#
|
196
198
|
# # format 1
|
197
199
|
# @core = Appium::Core.for caps: {...}, appium_lib: {...}
|
198
|
-
# # format 2. 'desired_capabilities:' is also available instead of 'caps:'.
|
199
|
-
# @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: {...}
|
200
202
|
# # format 3. 'appium_lib: {...}' can be blank
|
201
203
|
# @core = Appium::Core.for url: "http://127.0.0.1:8080/wd/hub", desired_capabilities: {...}
|
202
204
|
#
|
@@ -226,9 +228,9 @@ module Appium
|
|
226
228
|
# @core.start_driver # Connect to 'http://127.0.0.1:8080/wd/hub' because of 'port: 8080'
|
227
229
|
#
|
228
230
|
# # Start iOS driver with .zip file over HTTP
|
229
|
-
# # '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.
|
230
232
|
# opts = {
|
231
|
-
#
|
233
|
+
# capabilities: {
|
232
234
|
# platformName: :ios,
|
233
235
|
# platformVersion: '11.0',
|
234
236
|
# deviceName: 'iPhone Simulator',
|
@@ -492,7 +494,7 @@ module Appium
|
|
492
494
|
private
|
493
495
|
|
494
496
|
# @private
|
495
|
-
def extend_for(device:, automation_name:)
|
497
|
+
def extend_for(device:, automation_name:) # rubocop:disable Metrics/CyclomaticComplexity
|
496
498
|
extend Appium::Core
|
497
499
|
extend Appium::Core::Device
|
498
500
|
|
@@ -503,21 +505,37 @@ module Appium
|
|
503
505
|
::Appium::Core::Android::Espresso::Bridge.for self
|
504
506
|
when :uiautomator2
|
505
507
|
::Appium::Core::Android::Uiautomator2::Bridge.for self
|
508
|
+
when :gecko
|
509
|
+
::Appium::Logger.debug('Gecko Driver for Android')
|
506
510
|
else # default and UiAutomator
|
507
511
|
::Appium::Core::Android::Uiautomator1::Bridge.for self
|
508
512
|
end
|
509
513
|
when :ios, :tvos
|
510
514
|
case automation_name
|
515
|
+
when :safari
|
516
|
+
::Appium::Logger.debug('SafariDriver for iOS')
|
511
517
|
when :xcuitest
|
512
518
|
::Appium::Core::Ios::Xcuitest::Bridge.for self
|
513
519
|
else # default and UIAutomation
|
514
520
|
::Appium::Core::Ios::Uiautomation::Bridge.for self
|
515
521
|
end
|
516
522
|
when :mac
|
517
|
-
|
518
|
-
|
523
|
+
case automation_name
|
524
|
+
when :safari
|
525
|
+
::Appium::Logger.debug('SafariDriver for macOS')
|
526
|
+
when :gecko
|
527
|
+
::Appium::Logger.debug('Gecko Driver for macOS')
|
528
|
+
else
|
529
|
+
# no Mac specific extentions
|
530
|
+
::Appium::Logger.debug('macOS Native')
|
531
|
+
end
|
519
532
|
when :windows
|
520
|
-
|
533
|
+
case automation_name
|
534
|
+
when :gecko
|
535
|
+
::Appium::Logger.debug('Gecko Driver for Windows')
|
536
|
+
else
|
537
|
+
::Appium::Core::Windows::Bridge.for self
|
538
|
+
end
|
521
539
|
when :tizen
|
522
540
|
# https://github.com/Samsung/appium-tizen-driver
|
523
541
|
::Appium::Logger.debug('tizen')
|
@@ -529,6 +547,8 @@ module Appium
|
|
529
547
|
when :mac
|
530
548
|
# In this case also can be mac
|
531
549
|
::Appium::Logger.debug('mac')
|
550
|
+
when :gecko # other general platform
|
551
|
+
::Appium::Logger.debug('Gecko Driver')
|
532
552
|
else
|
533
553
|
::Appium::Logger.warn("No matched driver by platformName: #{device} and automationName: #{automation_name}")
|
534
554
|
end
|
@@ -541,7 +561,10 @@ module Appium
|
|
541
561
|
def validate_keys(opts)
|
542
562
|
flatten_ops = flatten_hash_keys(opts)
|
543
563
|
|
544
|
-
|
564
|
+
# FIXME: Remove 'desired_capabilities' in the next major Selenium update
|
565
|
+
unless opts.member?(:caps) || opts.member?(:capabilities) || opts.member?(:desired_capabilities)
|
566
|
+
raise Error::NoCapabilityError
|
567
|
+
end
|
545
568
|
|
546
569
|
if !opts.member?(:appium_lib) && flatten_ops.member?(:appium_lib)
|
547
570
|
raise Error::CapabilityStructureError, 'Please check the value of appium_lib in the capability'
|
@@ -562,7 +585,8 @@ module Appium
|
|
562
585
|
|
563
586
|
# @private
|
564
587
|
def get_caps(opts)
|
565
|
-
|
588
|
+
# FIXME: Remove 'desired_capabilities' in the next major Selenium update
|
589
|
+
Core::Base::Capabilities.create_capabilities(opts[:caps] || opts[:capabilities] || opts[:desired_capabilities] || {})
|
566
590
|
end
|
567
591
|
|
568
592
|
# @private
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
module Appium
|
16
16
|
module Core
|
17
|
-
VERSION = '3.
|
18
|
-
DATE = '2020-
|
17
|
+
VERSION = '3.11.1' unless defined? ::Appium::Core::VERSION
|
18
|
+
DATE = '2020-11-20' unless defined? ::Appium::Core::DATE
|
19
19
|
end
|
20
20
|
end
|
data/release_notes.md
CHANGED
@@ -1,3 +1,56 @@
|
|
1
|
+
#### v3.11.1 2020-11-20
|
2
|
+
|
3
|
+
- [4fe582c](https://github.com/appium/ruby_lib_core/commit/4fe582c1318c2b5de83fcf87e36d1fedab8ed81a) Release 3.11.1
|
4
|
+
- [e017ebc](https://github.com/appium/ruby_lib_core/commit/e017ebcaa8c50653e2f45871465c78ad5a8ce81e) fix: install_app args options bug (#286)
|
5
|
+
- [e7b881c](https://github.com/appium/ruby_lib_core/commit/e7b881c19be1b3a9acf7d01f34f59307b8e16b89) chore(deps-dev): update webmock requirement from ~> 3.9.1 to ~> 3.10.0 (#284)
|
6
|
+
- [d1e8cb8](https://github.com/appium/ruby_lib_core/commit/d1e8cb864f00d4f4bd307b523cc205ee2a636d33) feat: add safari and geckodriver (#283)
|
7
|
+
- [569ea09](https://github.com/appium/ruby_lib_core/commit/569ea09f7777dd2508f1919ddcf9b88aba272647) test: use predicate instead of name for 'value' (#282)
|
8
|
+
- [e4d63eb](https://github.com/appium/ruby_lib_core/commit/e4d63eb82248a79b41fbbc39db5b03cc35d447cd) ci: remove duplicated test running
|
9
|
+
- [30be7dc](https://github.com/appium/ruby_lib_core/commit/30be7dca0ec3cdcafa647899447387924970df34) test: fix tests
|
10
|
+
- [94d4250](https://github.com/appium/ruby_lib_core/commit/94d4250033107ff956a2b9c1f0b30fedba286b5d) test: remove a trick
|
11
|
+
- [6605f78](https://github.com/appium/ruby_lib_core/commit/6605f78fb0d996faad7f1e21f1876eab5184d430) test: tweak test cases
|
12
|
+
- [7dbbadb](https://github.com/appium/ruby_lib_core/commit/7dbbadbda69ee2f710393768fb994e8e43adb3bb) fix lint
|
13
|
+
- [7619052](https://github.com/appium/ruby_lib_core/commit/76190523c95e3f6a1ab9a9af48d60605d2f87266) tweak test cases
|
14
|
+
- [87cb224](https://github.com/appium/ruby_lib_core/commit/87cb224a3f32261823fd5bacd9349cbe2158b54c) chore(deps-dev): update webmock requirement from ~> 3.8.0 to ~> 3.9.1 (#281)
|
15
|
+
- [577a75a](https://github.com/appium/ruby_lib_core/commit/577a75a690b6f0688dead506c26704c82ea6f2e9) ci: update for espresso (#280)
|
16
|
+
|
17
|
+
|
18
|
+
#### v3.11.0 2020-08-01
|
19
|
+
|
20
|
+
- [0ed888e](https://github.com/appium/ruby_lib_core/commit/0ed888efd87def79cdb1ca922268b466485a2261) Release 3.11.0
|
21
|
+
- [f7dc534](https://github.com/appium/ruby_lib_core/commit/f7dc5349a48ac305df740f7be1f6e5f9b90e1e0e) chore: update faye-websocket (#279)
|
22
|
+
- [2fa2440](https://github.com/appium/ruby_lib_core/commit/2fa24404aa993c643191a2de0f8c2c800680ec5f) test: tweak espresso (#278)
|
23
|
+
- [ba7f71d](https://github.com/appium/ruby_lib_core/commit/ba7f71d82393b75d7119dbb50f8c0ae781d0933e) ci: revert
|
24
|
+
- [c2cf5d7](https://github.com/appium/ruby_lib_core/commit/c2cf5d7ef04c51e0b978676ea5145223f1b16f2e) test: add allOf example (#274)
|
25
|
+
- [f7c21b8](https://github.com/appium/ruby_lib_core/commit/f7c21b878ac9970f6d621deedf4c9adce7515700) ci: tweak version
|
26
|
+
- [2162392](https://github.com/appium/ruby_lib_core/commit/2162392bfa5cc949aae9b4020d6b53b7b23953f9) ci: specify which beta (#273)
|
27
|
+
|
28
|
+
|
29
|
+
#### v3.10.1 2020-06-29
|
30
|
+
|
31
|
+
- [9537c61](https://github.com/appium/ruby_lib_core/commit/9537c619220177a4cac82368405fec681a5ab231) Release 3.10.1
|
32
|
+
- [3b962f5](https://github.com/appium/ruby_lib_core/commit/3b962f55cc954699e72b38c94e5a1f05c82867f9) ci: runs tests on windows host as GitHub Actions (#272)
|
33
|
+
- [f60b4f1](https://github.com/appium/ruby_lib_core/commit/f60b4f193c590d861342828bd740cefda7e96b9a) ci: remove travis (#271)
|
34
|
+
- [b1aa80d](https://github.com/appium/ruby_lib_core/commit/b1aa80dd1cc200917df9958b6274e0a82b5ffc40) ci: run unittests on GitHub Actions (#270)
|
35
|
+
- [ad90f79](https://github.com/appium/ruby_lib_core/commit/ad90f79b726aa480edf989fed2a8b00ced6c52fd) chore: Update issue templates
|
36
|
+
- [cf546a0](https://github.com/appium/ruby_lib_core/commit/cf546a0c62f815df4bb3ece4932b8033fad25ae2) ci: tune Azure (#269)
|
37
|
+
- [14e7e56](https://github.com/appium/ruby_lib_core/commit/14e7e56a2bccb4c4cc53e0b10284e3837e50a1af) ci: bump android emulator version (#268)
|
38
|
+
- [8d2cd95](https://github.com/appium/ruby_lib_core/commit/8d2cd95445d95716617c426e759e19e861ef09e2) chore: remove pry added accidentally
|
39
|
+
|
40
|
+
|
41
|
+
#### v3.10.0 2020-06-09
|
42
|
+
|
43
|
+
- [9eff959](https://github.com/appium/ruby_lib_core/commit/9eff959240effde56460c77878a24a20d047f9e9) Release 3.10.0
|
44
|
+
- [0602e2a](https://github.com/appium/ruby_lib_core/commit/0602e2ab2b332f7db8e39b7da73707a50720fadd) feat: Remove timeout deprecated (#267)
|
45
|
+
|
46
|
+
|
47
|
+
#### v3.9.0 2020-05-31
|
48
|
+
|
49
|
+
- [f306188](https://github.com/appium/ruby_lib_core/commit/f306188102222088fbd31b0b9249c6a39ddd074f) Release 3.9.0
|
50
|
+
- [30c6529](https://github.com/appium/ruby_lib_core/commit/30c65299e4dffb9a2cea8b7a11b27cfcba294707) ci: run with Xcode 11.5 (#265)
|
51
|
+
- [a10f2d1](https://github.com/appium/ruby_lib_core/commit/a10f2d15ef83e9ce7003b88ec1c0923c922974ea) feat: allow :capabilities as argument (#266)
|
52
|
+
|
53
|
+
|
1
54
|
#### v3.8.0 2020-05-17
|
2
55
|
|
3
56
|
- [8986a54](https://github.com/appium/ruby_lib_core/commit/8986a5400d6a3575b7413f15bb61de09af2ec789) Release 3.8.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.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-
|
11
|
+
date: 2020-11-21 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
|
@@ -120,14 +120,14 @@ dependencies:
|
|
120
120
|
requirements:
|
121
121
|
- - "~>"
|
122
122
|
- !ruby/object:Gem::Version
|
123
|
-
version: 3.
|
123
|
+
version: 3.10.0
|
124
124
|
type: :development
|
125
125
|
prerelease: false
|
126
126
|
version_requirements: !ruby/object:Gem::Requirement
|
127
127
|
requirements:
|
128
128
|
- - "~>"
|
129
129
|
- !ruby/object:Gem::Version
|
130
|
-
version: 3.
|
130
|
+
version: 3.10.0
|
131
131
|
- !ruby/object:Gem::Dependency
|
132
132
|
name: rubocop
|
133
133
|
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
|