appium_lib_core 3.1.2 → 3.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -2
- data/CHANGELOG.md +14 -4
- data/README.md +1 -1
- data/Rakefile +3 -3
- data/azure-pipelines.yml +22 -22
- data/ci-jobs/functional/android_setup.yml +3 -0
- data/ci-jobs/functional/ios_setup.yml +5 -0
- data/ci-jobs/functional/publish_test_result.yml +18 -0
- data/ci-jobs/functional/run_appium.yml +18 -0
- data/ci-jobs/functional/start-emulator.sh +26 -0
- data/ci-jobs/functional_test.yml +225 -0
- data/lib/appium_lib_core/android/device.rb +20 -2
- data/lib/appium_lib_core/common/base/driver.rb +9 -5
- data/lib/appium_lib_core/version.rb +2 -2
- data/release_notes.md +16 -0
- metadata +8 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5798df58380b50a707092f9b68a1ad39b3da1ac8e5103ee0c0b0f178a338c828
|
4
|
+
data.tar.gz: ff85cb387a48c36ec2b4f50e4b59214cdc84fb4a7452e1f31ac7f8c127c9bebd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8bbdf3f1b440126a92ae5fac4e7f88a7edfffdcbf661acbab43c156678a3406df19294e6aa6417679b4ca6e7d1617ce89d37cd30e91c6e894bd79f8f41bc3f3f
|
7
|
+
data.tar.gz: af3f57193be3c0e179b1fa0b96f0ce9a443b3e8e997df33d6ce76eaf8cb5bfd76f3f32bac4e0ebb8d13204c7e098ab7fb8646a756201914c5a7a2aaa2d47f917
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -10,6 +10,16 @@ Read `release_notes.md` for commit level details.
|
|
10
10
|
|
11
11
|
### Deprecations
|
12
12
|
|
13
|
+
## [3.1.3] - 2019-06-18
|
14
|
+
|
15
|
+
### Enhancements
|
16
|
+
- Add arguments for `start_activity`
|
17
|
+
- `intentAction`, `intentCategory`, `intentFlags`, `dontStopAppOnReset`
|
18
|
+
|
19
|
+
### Bug fixes
|
20
|
+
|
21
|
+
### Deprecations
|
22
|
+
|
13
23
|
## [3.1.2] - 2019-05-10
|
14
24
|
|
15
25
|
### Enhancements
|
@@ -203,11 +213,11 @@ The behaviour follows the default spec in WebDriver.
|
|
203
213
|
|
204
214
|
## [2.1.0] - 2018-11-14
|
205
215
|
### Enhancements
|
206
|
-
- Support below style _1_, has _url_ parameter, in addition to style _2_
|
216
|
+
- Support below style _1_, has _url_ parameter, in addition to style _2_
|
207
217
|
```
|
208
218
|
# 1
|
209
219
|
Appium::Core.for url: "http://127.0.0.1:8080/wd/hub", caps: {...}, appium_lib: {...}
|
210
|
-
|
220
|
+
|
211
221
|
# 2
|
212
222
|
Appium::Core.for caps: {...}, appium_lib: {...}
|
213
223
|
```
|
@@ -499,7 +509,7 @@ This release has a breaking change for creating core. Thus, I've bumped the majo
|
|
499
509
|
|
500
510
|
## [1.3.4] - 2018-03-21
|
501
511
|
### Enhancements
|
502
|
-
- Add `save_viewport_screenshot` which get screenshot except for status bar.
|
512
|
+
- Add `save_viewport_screenshot` which get screenshot except for status bar.
|
503
513
|
- https://github.com/search?q=org%3Aappium+viewportScreenshot&type=Code
|
504
514
|
- [iOS] Add `start_performance_record` and `get_performance_record`
|
505
515
|
|
@@ -541,7 +551,7 @@ This release has a breaking change for creating core. Thus, I've bumped the majo
|
|
541
551
|
Appium::Core::TouchAction.new(@driver)
|
542
552
|
.swipe(start_x: 75, start_y: 500, offset_x: 75, offset_y: 500, duration: 500)
|
543
553
|
.perform
|
544
|
-
|
554
|
+
|
545
555
|
# Tap (75, 500) and move the point to (75, 1000) with duration 500ms.
|
546
556
|
Appium::Core::TouchAction.new(@driver)
|
547
557
|
.swipe(start_x: 75, start_y: 500, offset_x: 75, offset_y: 1000, duration: 500)
|
data/README.md
CHANGED
@@ -2,7 +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 |
|
5
|
+
| Travis, Ubuntu | Azure, Windows and functional tests |
|
6
6
|
|:---:|:---:|
|
7
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_windows/_apis/build/status/appium.ruby_lib_core)](https://dev.azure.com/kazucocoa/ruby_lib_core_windows/_build/latest?definitionId=4)|
|
8
8
|
|
data/Rakefile
CHANGED
@@ -17,14 +17,14 @@ namespace :test do
|
|
17
17
|
|
18
18
|
t.libs << 'test'
|
19
19
|
t.libs << 'lib'
|
20
|
-
t.test_files = FileList['test/functional/ios/**/*_test.rb']
|
20
|
+
t.test_files = FileList[ENV['TESTS'] ? ENV['TESTS'].split(',') : 'test/functional/ios/**/*_test.rb']
|
21
21
|
end
|
22
22
|
|
23
23
|
desc('Run all Android related tests in test directory')
|
24
24
|
Rake::TestTask.new(:android) do |t|
|
25
25
|
t.libs << 'test'
|
26
26
|
t.libs << 'lib'
|
27
|
-
t.test_files = FileList['test/functional/android/**/*_test.rb']
|
27
|
+
t.test_files = FileList[ENV['TESTS'] ? ENV['TESTS'].split(',') : 'test/functional/android/**/*_test.rb']
|
28
28
|
end
|
29
29
|
end
|
30
30
|
|
@@ -32,7 +32,7 @@ namespace :test do
|
|
32
32
|
Rake::TestTask.new(:unit) do |t|
|
33
33
|
t.libs << 'test'
|
34
34
|
t.libs << 'lib'
|
35
|
-
t.test_files = FileList['test/unit/**/*_test.rb']
|
35
|
+
t.test_files = FileList[ENV['TESTS'] ? ENV['TESTS'].split(',') : 'test/unit/**/*_test.rb']
|
36
36
|
end
|
37
37
|
|
38
38
|
namespace :unit do
|
data/azure-pipelines.yml
CHANGED
@@ -2,25 +2,25 @@
|
|
2
2
|
# Package your Ruby project.
|
3
3
|
# Add steps that install rails, analyze code, save build artifacts, deploy, and more:
|
4
4
|
# https://docs.microsoft.com/azure/devops/pipelines/languages/ruby
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
- script: gem install bundler ffi:1.10.0
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
- script:
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
5
|
+
jobs:
|
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'
|
@@ -0,0 +1,18 @@
|
|
1
|
+
steps:
|
2
|
+
- task: PublishTestResults@2
|
3
|
+
condition: always()
|
4
|
+
inputs:
|
5
|
+
testResultsFiles: 'test/reports/TEST-AppiumLibCoreTest*.xml'
|
6
|
+
testRunTitle: ${{ parameters.title }}
|
7
|
+
- task: ArchiveFiles@2
|
8
|
+
condition: always()
|
9
|
+
inputs:
|
10
|
+
rootFolderOrFile: 'test/report'
|
11
|
+
archiveType: 'zip'
|
12
|
+
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
|
13
|
+
replaceExistingArchive: true
|
14
|
+
- task: PublishBuildArtifacts@1
|
15
|
+
condition: always()
|
16
|
+
inputs:
|
17
|
+
pathtoPublish: '$(Build.ArtifactStagingDirectory)'
|
18
|
+
artifactName: 'test reports'
|
@@ -0,0 +1,18 @@
|
|
1
|
+
steps:
|
2
|
+
- task: NodeTool@0
|
3
|
+
inputs:
|
4
|
+
versionSpec: 11.x
|
5
|
+
displayName: Install Node 11.x
|
6
|
+
- script: npm install -g appium@beta --chromedriver_version='2.44'
|
7
|
+
displayName: Install appium beta
|
8
|
+
- script: npm install -g mjpeg-consumer
|
9
|
+
displayName: Install MJPEG Consumer
|
10
|
+
- task: UseRubyVersion@0
|
11
|
+
inputs:
|
12
|
+
versionSpec: '2.4' # so far, bundler does not work over 2.5 since it raises openssl error
|
13
|
+
- script: nohup appium --relaxed-security &
|
14
|
+
displayName: Run Appium in background
|
15
|
+
- script: |
|
16
|
+
gem install bundler;
|
17
|
+
bundle install --retry=3 --jobs=4 --path vendor/bundle;
|
18
|
+
displayName: Install Gems
|
@@ -0,0 +1,26 @@
|
|
1
|
+
#!/usr/bin/env bash
|
2
|
+
|
3
|
+
# This script was copy-pasted from https://docs.microsoft.com/en-us/azure/devops/pipelines/languages/android?view=azure-devops#test-on-the-android-emulator
|
4
|
+
# with some changes
|
5
|
+
|
6
|
+
# Install AVD files
|
7
|
+
declare -r emulator="system-images;android-${ANDROID_SDK_VERSION};google_apis;x86"
|
8
|
+
echo "y" | ${ANDROID_HOME}/tools/bin/sdkmanager --install "$emulator"
|
9
|
+
|
10
|
+
# Show a list of emulators
|
11
|
+
${ANDROID_HOME}/tools/bin/avdmanager list
|
12
|
+
|
13
|
+
# Create emulator
|
14
|
+
echo "no" | ${ANDROID_HOME}/tools/bin/avdmanager create avd -d "Nexus 5X" -n testemulator -k "${emulator}" --force
|
15
|
+
|
16
|
+
echo ${ANDROID_HOME}/emulator/emulator -list-avds
|
17
|
+
|
18
|
+
echo "Starting emulator"
|
19
|
+
|
20
|
+
# Start emulator in background
|
21
|
+
nohup ${ANDROID_HOME}/emulator/emulator -avd testemulator -no-boot-anim -no-snapshot > /dev/null 2>&1 &
|
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
|
+
|
24
|
+
${ANDROID_HOME}/platform-tools/adb devices
|
25
|
+
|
26
|
+
echo "Emulator started"
|
@@ -0,0 +1,225 @@
|
|
1
|
+
# jobs for functional test
|
2
|
+
parameters:
|
3
|
+
vmImage: 'macOS-10.14'
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
# Run unit tests on different Node versions
|
7
|
+
- job: func_test_ios_base
|
8
|
+
pool:
|
9
|
+
vmImage: ${{ parameters.vmImage }}
|
10
|
+
variables:
|
11
|
+
CI: true
|
12
|
+
steps:
|
13
|
+
- template: ./functional/ios_setup.yml
|
14
|
+
parameters:
|
15
|
+
xcodeVersion: 10.1
|
16
|
+
- template: ./functional/run_appium.yml
|
17
|
+
- script: bundle exec rake test:func:ios TESTS=test/functional/ios/driver_test.rb,test/functional/ios/patch_test.rb
|
18
|
+
displayName: Run tests
|
19
|
+
- template: ./functional/publish_test_result.yml
|
20
|
+
parameters:
|
21
|
+
xcodeVersion: 'Run_func_test_on_iOS'
|
22
|
+
|
23
|
+
- job: func_test_ios_webdriver1
|
24
|
+
pool:
|
25
|
+
vmImage: ${{ parameters.vmImage }}
|
26
|
+
variables:
|
27
|
+
CI: true
|
28
|
+
steps:
|
29
|
+
- template: ./functional/ios_setup.yml
|
30
|
+
parameters:
|
31
|
+
xcodeVersion: 10.1
|
32
|
+
- template: ./functional/run_appium.yml
|
33
|
+
- script: bundle exec rake test:func:ios TESTS=test/functional/ios/webdriver/create_session_test.rb,test/functional/ios/webdriver/w3c_actions_test.rb
|
34
|
+
displayName: Run tests
|
35
|
+
- template: ./functional/publish_test_result.yml
|
36
|
+
parameters:
|
37
|
+
xcodeVersion: 'Run_func_test_on_iOS_webdriver1'
|
38
|
+
|
39
|
+
- job: func_test_ios_webdriver2
|
40
|
+
pool:
|
41
|
+
vmImage: ${{ parameters.vmImage }}
|
42
|
+
variables:
|
43
|
+
CI: true
|
44
|
+
steps:
|
45
|
+
- template: ./functional/ios_setup.yml
|
46
|
+
parameters:
|
47
|
+
xcodeVersion: 10.1
|
48
|
+
- template: ./functional/run_appium.yml
|
49
|
+
- script: bundle exec rake test:func:ios TESTS=test/functional/ios/webdriver/device_test.rb
|
50
|
+
displayName: Run tests
|
51
|
+
- template: ./functional/publish_test_result.yml
|
52
|
+
parameters:
|
53
|
+
xcodeVersion: 'Run_func_test_on_iOS_webdriver2'
|
54
|
+
|
55
|
+
- job: func_test_ios_ios1
|
56
|
+
pool:
|
57
|
+
vmImage: ${{ parameters.vmImage }}
|
58
|
+
variables:
|
59
|
+
CI: true
|
60
|
+
steps:
|
61
|
+
- template: ./functional/ios_setup.yml
|
62
|
+
parameters:
|
63
|
+
xcodeVersion: 10.1
|
64
|
+
- template: ./functional/run_appium.yml
|
65
|
+
- script: bundle exec rake test:func:ios TESTS=test/functional/ios/ios/device_test.rb
|
66
|
+
displayName: Run tests
|
67
|
+
- template: ./functional/publish_test_result.yml
|
68
|
+
parameters:
|
69
|
+
xcodeVersion: 'Run_func_test_on_iOS_ios1'
|
70
|
+
|
71
|
+
- job: func_test_ios_ios2
|
72
|
+
pool:
|
73
|
+
vmImage: ${{ parameters.vmImage }}
|
74
|
+
variables:
|
75
|
+
CI: true
|
76
|
+
steps:
|
77
|
+
- template: ./functional/ios_setup.yml
|
78
|
+
parameters:
|
79
|
+
xcodeVersion: 10.1
|
80
|
+
- template: ./functional/run_appium.yml
|
81
|
+
- script: bundle exec rake test:func:ios TESTS=test/functional/ios/ios/device_wda_attachment_test.rb,test/functional/ios/ios/image_comparison_test.rb
|
82
|
+
displayName: Run tests
|
83
|
+
- template: ./functional/publish_test_result.yml
|
84
|
+
parameters:
|
85
|
+
xcodeVersion: 'Run_func_test_on_iOS_ios2'
|
86
|
+
|
87
|
+
- job: func_test_ios_ios3
|
88
|
+
pool:
|
89
|
+
vmImage: ${{ parameters.vmImage }}
|
90
|
+
variables:
|
91
|
+
CI: true
|
92
|
+
steps:
|
93
|
+
- template: ./functional/ios_setup.yml
|
94
|
+
parameters:
|
95
|
+
xcodeVersion: 10.1
|
96
|
+
- script: brew install ffmpeg && brew tap wix/brew && brew install wix/brew/applesimutils
|
97
|
+
displayName: Install ffmpeg and applesimutils
|
98
|
+
- template: ./functional/run_appium.yml
|
99
|
+
- script: bundle exec rake test:func:ios TESTS=test/functional/ios/ios/mjpeg_server_test.rb,test/functional/ios/ios/mobile_commands_test.rb,test/functional/ios/ios/search_context_test.rb
|
100
|
+
displayName: Run tests
|
101
|
+
- template: ./functional/publish_test_result.yml
|
102
|
+
parameters:
|
103
|
+
xcodeVersion: 'Run_func_test_on_iOS_ios3'
|
104
|
+
|
105
|
+
- job: func_test_ios_tvos
|
106
|
+
pool:
|
107
|
+
vmImage: ${{ parameters.vmImage }}
|
108
|
+
variables:
|
109
|
+
CI: true
|
110
|
+
steps:
|
111
|
+
- template: ./functional/ios_setup.yml
|
112
|
+
parameters:
|
113
|
+
xcodeVersion: 10.2
|
114
|
+
- template: ./functional/run_appium.yml
|
115
|
+
- script: bundle exec rake test:func:ios TESTS=test/functional/ios/tv_driver_test.rb
|
116
|
+
displayName: Run tests
|
117
|
+
- template: ./functional/publish_test_result.yml
|
118
|
+
parameters:
|
119
|
+
xcodeVersion: 'Run_func_test_on_iOS_tv'
|
120
|
+
|
121
|
+
- job: func_test_android_base
|
122
|
+
pool:
|
123
|
+
vmImage: ${{ parameters.vmImage }}
|
124
|
+
variables:
|
125
|
+
CI: true
|
126
|
+
ANDROID_SDK_VERSION: 28
|
127
|
+
steps:
|
128
|
+
- template: ./functional/android_setup.yml
|
129
|
+
- template: ./functional/run_appium.yml
|
130
|
+
- script: bundle exec rake test:func:android TESTS=test/functional/android/driver_test.rb,test/functional/android/patch_test.rb
|
131
|
+
displayName: Run tests
|
132
|
+
- template: ./functional/publish_test_result.yml
|
133
|
+
parameters:
|
134
|
+
xcodeVersion: 'Run_func_test_on_android_base'
|
135
|
+
|
136
|
+
- job: func_test_android_webdriver
|
137
|
+
pool:
|
138
|
+
vmImage: ${{ parameters.vmImage }}
|
139
|
+
variables:
|
140
|
+
CI: true
|
141
|
+
ANDROID_SDK_VERSION: 28
|
142
|
+
steps:
|
143
|
+
- template: ./functional/android_setup.yml
|
144
|
+
- template: ./functional/run_appium.yml
|
145
|
+
- 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
|
146
|
+
displayName: Run tests
|
147
|
+
- template: ./functional/publish_test_result.yml
|
148
|
+
parameters:
|
149
|
+
xcodeVersion: 'Run_func_test_on_android_base'
|
150
|
+
|
151
|
+
- job: func_test_android_android1
|
152
|
+
pool:
|
153
|
+
vmImage: ${{ parameters.vmImage }}
|
154
|
+
variables:
|
155
|
+
CI: true
|
156
|
+
ANDROID_SDK_VERSION: 28
|
157
|
+
steps:
|
158
|
+
- template: ./functional/android_setup.yml
|
159
|
+
- template: ./functional/run_appium.yml
|
160
|
+
- script: bundle exec rake test:func:android TESTS=test/functional/android/android/device_test.rb
|
161
|
+
displayName: Run test/functional/android/android/device_test.rb
|
162
|
+
- template: ./functional/publish_test_result.yml
|
163
|
+
parameters:
|
164
|
+
xcodeVersion: 'func_test_android_android1'
|
165
|
+
|
166
|
+
- job: func_test_android_android2
|
167
|
+
pool:
|
168
|
+
vmImage: ${{ parameters.vmImage }}
|
169
|
+
variables:
|
170
|
+
CI: true
|
171
|
+
ANDROID_SDK_VERSION: 28
|
172
|
+
steps:
|
173
|
+
- template: ./functional/android_setup.yml
|
174
|
+
- template: ./functional/run_appium.yml
|
175
|
+
- script: bundle exec rake test:func:android TESTS=test/functional/android/android/image_comparison_test.rb,test/functional/android/android/mjpeg_server_test.rb
|
176
|
+
displayName: Run tests
|
177
|
+
- template: ./functional/publish_test_result.yml
|
178
|
+
parameters:
|
179
|
+
xcodeVersion: 'func_test_android_android2'
|
180
|
+
|
181
|
+
- job: func_test_android_android3
|
182
|
+
pool:
|
183
|
+
vmImage: ${{ parameters.vmImage }}
|
184
|
+
variables:
|
185
|
+
CI: true
|
186
|
+
ANDROID_SDK_VERSION: 28
|
187
|
+
steps:
|
188
|
+
- template: ./functional/android_setup.yml
|
189
|
+
- template: ./functional/run_appium.yml
|
190
|
+
- script: bundle exec rake test:func:android TESTS=test/functional/android/android/mobile_commands_test.rb,test/functional/android/android/search_context_test.rb
|
191
|
+
displayName: Run tests
|
192
|
+
- template: ./functional/publish_test_result.yml
|
193
|
+
parameters:
|
194
|
+
xcodeVersion: 'func_test_android_android3'
|
195
|
+
|
196
|
+
- job: func_test_android_android4
|
197
|
+
pool:
|
198
|
+
vmImage: ${{ parameters.vmImage }}
|
199
|
+
variables:
|
200
|
+
CI: true
|
201
|
+
ANDROID_SDK_VERSION: 28
|
202
|
+
steps:
|
203
|
+
- template: ./functional/android_setup.yml
|
204
|
+
- template: ./functional/run_appium.yml
|
205
|
+
- script: bundle exec rake test:func:android TESTS=test/functional/android/android/device_data_test.rb
|
206
|
+
displayName: Run tests
|
207
|
+
- template: ./functional/publish_test_result.yml
|
208
|
+
parameters:
|
209
|
+
xcodeVersion: 'func_test_android_android4'
|
210
|
+
|
211
|
+
- job: func_test_android_mobile_command_espresso
|
212
|
+
pool:
|
213
|
+
vmImage: ${{ parameters.vmImage }}
|
214
|
+
variables:
|
215
|
+
CI: true
|
216
|
+
ANDROID_SDK_VERSION: 28
|
217
|
+
AUTOMATION_NAME_DROID: espresso
|
218
|
+
steps:
|
219
|
+
- template: ./functional/android_setup.yml
|
220
|
+
- template: ./functional/run_appium.yml
|
221
|
+
- script: bundle exec rake test:func:android TESTS=test/functional/android/android/mobile_commands_test.rb
|
222
|
+
displayName: Run tests
|
223
|
+
- template: ./functional/publish_test_result.yml
|
224
|
+
parameters:
|
225
|
+
xcodeVersion: 'func_test_android_mobile_command_espresso'
|
@@ -147,11 +147,20 @@ module Appium
|
|
147
147
|
# @!method start_activity(opts)
|
148
148
|
# Android only. Start a new activity within the current app or launch a new app and start the target activity.
|
149
149
|
#
|
150
|
+
# Read https://developer.android.com/studio/command-line/adb#IntentSpec for each flags.
|
151
|
+
#
|
150
152
|
# @param opts [Hash] Options
|
151
153
|
# @option opts [String] :app_package The package owning the activity [required]
|
152
154
|
# @option opts [String] :app_activity The target activity [required]
|
153
155
|
# @option opts [String] :app_wait_package The package to start before the target package [optional]
|
154
156
|
# @option opts [String] :app_wait_activity The activity to start before the target activity [optional]
|
157
|
+
# @option opts [String] :intent_action The intent action to give it when start the target activity (`-a`) [optional]
|
158
|
+
# @option opts [String] :intent_category The intent category to give it when start the target activity (`-c`) [optional]
|
159
|
+
# @option opts [String] :intent_flags The intent flag to give it when start the target activity (`-f`) [optional]
|
160
|
+
# @option opts [String] :optional_intent_arguments The optional intent action to give it when start the target activity [optional]
|
161
|
+
# You can set arbitrary arguments with space as string.
|
162
|
+
# e.g. `'--ez your_extra_bool bool --ei your_extra_int 1'`
|
163
|
+
# @option opts [bool] :dont_stop_app_on_reset Do not stop the app when the reset is called in Appium create/delete session [optional]
|
155
164
|
#
|
156
165
|
# @example
|
157
166
|
#
|
@@ -333,8 +342,17 @@ module Appium
|
|
333
342
|
option[:appWaitPackage] = app_wait_package if app_wait_package
|
334
343
|
option[:appWaitActivity] = app_wait_activity if app_wait_activity
|
335
344
|
|
336
|
-
|
337
|
-
|
345
|
+
intent_action = opts.fetch(:intent_action, nil)
|
346
|
+
intent_category = opts.fetch(:intent_category, nil)
|
347
|
+
intent_flags = opts.fetch(:intent_flags, nil)
|
348
|
+
optional_intent_arguments = opts.fetch(:optional_intent_arguments, nil)
|
349
|
+
dont_stop_app_on_reset = opts.fetch(:dont_stop_app_on_reset, nil)
|
350
|
+
|
351
|
+
option[:intentAction] = intent_action if intent_action
|
352
|
+
option[:intentCategory] = intent_category if intent_category
|
353
|
+
option[:intentFlags] = intent_flags if intent_flags
|
354
|
+
option[:optionalIntentArguments] = optional_intent_arguments if optional_intent_arguments
|
355
|
+
option[:dontStopAppOnReset] = dont_stop_app_on_reset if dont_stop_app_on_reset
|
338
356
|
|
339
357
|
execute :start_activity, {}, option
|
340
358
|
end
|
@@ -435,9 +435,12 @@ module Appium
|
|
435
435
|
#
|
436
436
|
# @example
|
437
437
|
#
|
438
|
-
# @driver.pull_file '/local/data/some/path' #=> Get the file at that path
|
439
|
-
# @driver.pull_file 'Shenanigans.app/some/file'
|
440
|
-
#
|
438
|
+
# decoded_file = @driver.pull_file '/local/data/some/path' #=> Get the file at that path
|
439
|
+
# decoded_file = @driver.pull_file 'Shenanigans.app/some/file'
|
440
|
+
# #=> Get 'some/file' from the install location of Shenanigans.app
|
441
|
+
# decoded_file = @driver.pull_file '@com.appium.example/Documents/file.txt'
|
442
|
+
# #=> Get 'file.txt' in @com.appium.example/Documents
|
443
|
+
# File.open('proper_filename', 'wb') { |f| f<< decoded_file }
|
441
444
|
#
|
442
445
|
def pull_file(path)
|
443
446
|
@bridge.pull_file(path)
|
@@ -469,8 +472,9 @@ module Appium
|
|
469
472
|
#
|
470
473
|
# @example
|
471
474
|
#
|
472
|
-
# @driver.pull_folder '/data/local/tmp' #=> Get the folder at that path
|
473
|
-
# @driver.pull_file '@com.appium.example/Documents' #=> Get 'Documents' in @com.appium.example
|
475
|
+
# decoded_file = @driver.pull_folder '/data/local/tmp' #=> Get the folder at that path
|
476
|
+
# decoded_file = @driver.pull_file '@com.appium.example/Documents' #=> Get 'Documents' in @com.appium.example
|
477
|
+
# File.open('proper_filename', 'wb') { |f| f<< decoded_file }
|
474
478
|
#
|
475
479
|
def pull_folder(path)
|
476
480
|
@bridge.pull_folder(path)
|
@@ -14,7 +14,7 @@
|
|
14
14
|
|
15
15
|
module Appium
|
16
16
|
module Core
|
17
|
-
VERSION = '3.1.
|
18
|
-
DATE = '2019-
|
17
|
+
VERSION = '3.1.3' unless defined? ::Appium::Core::VERSION
|
18
|
+
DATE = '2019-06-18' unless defined? ::Appium::Core::DATE
|
19
19
|
end
|
20
20
|
end
|
data/release_notes.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
#### v3.1.3 2019-06-18
|
2
|
+
|
3
|
+
- [a63da6b](https://github.com/appium/ruby_lib_core/commit/a63da6b9e410d83fe1e1d35a89c430da0eae76b6) Release 3.1.3
|
4
|
+
- [b979325](https://github.com/appium/ruby_lib_core/commit/b9793257e489edf3ab71b8a371d8e52543040106) add arguments for start activity (#220)
|
5
|
+
- [5bae56a](https://github.com/appium/ruby_lib_core/commit/5bae56a6d073b22845cbc9c0ace7bbcea22cffa1) fix Azure running methods (#219)
|
6
|
+
- [a880589](https://github.com/appium/ruby_lib_core/commit/a880589fead59741bba081ebb8053e748feda7c5) test: remove comment-out (#218)
|
7
|
+
- [c9062c4](https://github.com/appium/ruby_lib_core/commit/c9062c4b744263d790c7de17263cbd4645cdefc6) add mobile command on espresso driver (#213)
|
8
|
+
- [75e3d16](https://github.com/appium/ruby_lib_core/commit/75e3d163511d2c809a8268e6fc569e3be1bd1be4) tweak func tests for ios13 (#217)
|
9
|
+
- [8104874](https://github.com/appium/ruby_lib_core/commit/8104874f3372a3ea1c5096adf2e8da4de008fe11) add examples for push/pull data for ios (#216)
|
10
|
+
- [b379841](https://github.com/appium/ruby_lib_core/commit/b3798414cda497019c33e7ef89ac882a7ad11a67) bump ruby ver on windows, Azure (#215)
|
11
|
+
- [bb7ba46](https://github.com/appium/ruby_lib_core/commit/bb7ba461fc1afb78cb5d5d3425c989fb6c438585) add android functional tests on azure (#211)
|
12
|
+
- [d104623](https://github.com/appium/ruby_lib_core/commit/d1046235dbfa1690bab522f8ae16893622582117) Add running func tests for iOS on Azure (#210)
|
13
|
+
- [ecd16c3](https://github.com/appium/ruby_lib_core/commit/ecd16c37072c173f9f0d8260ebc024e3c402e125) append an item in source test
|
14
|
+
- [371f653](https://github.com/appium/ruby_lib_core/commit/371f65379c896af070216e5dce9737edf3cca4de) Km/follow file wb mode (#209)
|
15
|
+
|
16
|
+
|
1
17
|
#### v3.1.2 2019-05-10
|
2
18
|
|
3
19
|
- [ba2e889](https://github.com/appium/ruby_lib_core/commit/ba2e889434a7405d5caac2adec08536cb6c07415) Release 3.1.2
|
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.1.
|
4
|
+
version: 3.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kazuaki MATSUO
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-06-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: selenium-webdriver
|
@@ -234,6 +234,12 @@ files:
|
|
234
234
|
- azure-pipelines.yml
|
235
235
|
- bin/console
|
236
236
|
- bin/setup
|
237
|
+
- ci-jobs/functional/android_setup.yml
|
238
|
+
- ci-jobs/functional/ios_setup.yml
|
239
|
+
- ci-jobs/functional/publish_test_result.yml
|
240
|
+
- ci-jobs/functional/run_appium.yml
|
241
|
+
- ci-jobs/functional/start-emulator.sh
|
242
|
+
- ci-jobs/functional_test.yml
|
237
243
|
- docs/mobile_command.md
|
238
244
|
- lib/appium_lib_core.rb
|
239
245
|
- lib/appium_lib_core/android.rb
|