appium_lib_core 4.1.0 → 5.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (64) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +129 -275
  3. data/README.md +12 -7
  4. data/Rakefile +4 -0
  5. data/appium_lib_core.gemspec +5 -8
  6. data/bin/console +0 -4
  7. data/lib/appium_lib_core/android/device/auth_finger_print.rb +2 -1
  8. data/lib/appium_lib_core/android/device.rb +4 -4
  9. data/lib/appium_lib_core/common/base/bridge.rb +291 -90
  10. data/lib/appium_lib_core/common/base/capabilities.rb +10 -3
  11. data/lib/appium_lib_core/common/base/device_ime.rb +49 -0
  12. data/lib/appium_lib_core/common/base/driver.rb +223 -184
  13. data/lib/appium_lib_core/common/base/driver_settings.rb +51 -0
  14. data/lib/appium_lib_core/common/base/has_location.rb +80 -0
  15. data/lib/appium_lib_core/common/base/has_network_connection.rb +56 -0
  16. data/lib/appium_lib_core/common/base/http_default.rb +1 -3
  17. data/lib/appium_lib_core/common/base/remote_status.rb +31 -0
  18. data/lib/appium_lib_core/common/base/rotable.rb +54 -0
  19. data/lib/appium_lib_core/common/base/screenshot.rb +6 -6
  20. data/lib/appium_lib_core/common/base/search_context.rb +19 -4
  21. data/lib/appium_lib_core/common/base.rb +1 -3
  22. data/lib/appium_lib_core/common/command.rb +255 -4
  23. data/lib/appium_lib_core/common/device/app_management.rb +2 -14
  24. data/lib/appium_lib_core/common/device/image_comparison.rb +12 -4
  25. data/lib/appium_lib_core/common/device/keyevent.rb +4 -4
  26. data/lib/appium_lib_core/common/{command/mjsonwp.rb → device/orientation.rb} +14 -11
  27. data/lib/appium_lib_core/common/device/touch_actions.rb +2 -0
  28. data/lib/appium_lib_core/common/device/value.rb +6 -6
  29. data/lib/appium_lib_core/common/error.rb +4 -1
  30. data/lib/appium_lib_core/common/log.rb +4 -1
  31. data/lib/appium_lib_core/common/touch_action/multi_touch.rb +19 -0
  32. data/lib/appium_lib_core/common/touch_action/touch_actions.rb +16 -2
  33. data/lib/appium_lib_core/common/wait.rb +38 -6
  34. data/lib/appium_lib_core/device.rb +1 -5
  35. data/lib/appium_lib_core/driver.rb +42 -50
  36. data/lib/appium_lib_core/{patch.rb → element.rb} +66 -9
  37. data/lib/appium_lib_core/ios/uiautomation/patch.rb +1 -1
  38. data/lib/appium_lib_core/{common/base/command.rb → mac2/bridge.rb} +9 -8
  39. data/lib/appium_lib_core/mac2/device/screen.rb +48 -0
  40. data/lib/appium_lib_core/mac2/device.rb +92 -0
  41. data/lib/appium_lib_core/mac2.rb +17 -0
  42. data/lib/appium_lib_core/version.rb +2 -2
  43. data/lib/appium_lib_core.rb +2 -5
  44. metadata +25 -84
  45. data/.github/ISSUE_TEMPLATE/issue-report.md +0 -29
  46. data/.github/contributing.md +0 -26
  47. data/.github/issue_template.md +0 -20
  48. data/.github/workflows/unittest.yml +0 -68
  49. data/.gitignore +0 -18
  50. data/.rubocop.yml +0 -58
  51. data/azure-pipelines.yml +0 -15
  52. data/ci-jobs/functional/android_setup.yml +0 -3
  53. data/ci-jobs/functional/ios_setup.yml +0 -7
  54. data/ci-jobs/functional/publish_test_result.yml +0 -18
  55. data/ci-jobs/functional/run_appium.yml +0 -25
  56. data/ci-jobs/functional/start-emulator.sh +0 -26
  57. data/ci-jobs/functional_test.yml +0 -298
  58. data/docs/mobile_command.md +0 -34
  59. data/lib/appium_lib_core/common/base/bridge/mjsonwp.rb +0 -81
  60. data/lib/appium_lib_core/common/base/bridge/w3c.rb +0 -252
  61. data/lib/appium_lib_core/common/command/common.rb +0 -110
  62. data/lib/appium_lib_core/common/command/w3c.rb +0 -56
  63. data/release_notes.md +0 -816
  64. data/script/commands.rb +0 -200
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: 4.1.0
4
+ version: 5.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuaki MATSUO
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-26 00:00:00.000000000 Z
11
+ date: 2022-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: selenium-webdriver
@@ -16,20 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '3.14'
20
- - - ">="
21
- - !ruby/object:Gem::Version
22
- version: 3.14.1
19
+ version: '4.2'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: '3.14'
30
- - - ">="
31
- - !ruby/object:Gem::Version
32
- version: 3.14.1
26
+ version: '4.2'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: faye-websocket
35
29
  requirement: !ruby/object:Gem::Requirement
@@ -44,20 +38,6 @@ dependencies:
44
38
  - - "~>"
45
39
  - !ruby/object:Gem::Version
46
40
  version: 0.11.0
47
- - !ruby/object:Gem::Dependency
48
- name: bundler
49
- requirement: !ruby/object:Gem::Requirement
50
- requirements:
51
- - - ">="
52
- - !ruby/object:Gem::Version
53
- version: '1.14'
54
- type: :development
55
- prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- version: '1.14'
61
41
  - !ruby/object:Gem::Dependency
62
42
  name: rake
63
43
  requirement: !ruby/object:Gem::Requirement
@@ -120,28 +100,28 @@ dependencies:
120
100
  requirements:
121
101
  - - "~>"
122
102
  - !ruby/object:Gem::Version
123
- version: 3.11.0
103
+ version: 3.14.0
124
104
  type: :development
125
105
  prerelease: false
126
106
  version_requirements: !ruby/object:Gem::Requirement
127
107
  requirements:
128
108
  - - "~>"
129
109
  - !ruby/object:Gem::Version
130
- version: 3.11.0
110
+ version: 3.14.0
131
111
  - !ruby/object:Gem::Dependency
132
112
  name: rubocop
133
113
  requirement: !ruby/object:Gem::Requirement
134
114
  requirements:
135
115
  - - '='
136
116
  - !ruby/object:Gem::Version
137
- version: 1.7.0
117
+ version: 1.30.1
138
118
  type: :development
139
119
  prerelease: false
140
120
  version_requirements: !ruby/object:Gem::Requirement
141
121
  requirements:
142
122
  - - '='
143
123
  - !ruby/object:Gem::Version
144
- version: 1.7.0
124
+ version: 1.30.1
145
125
  - !ruby/object:Gem::Dependency
146
126
  name: appium_thor
147
127
  requirement: !ruby/object:Gem::Requirement
@@ -156,34 +136,6 @@ dependencies:
156
136
  - - "~>"
157
137
  - !ruby/object:Gem::Version
158
138
  version: '1.0'
159
- - !ruby/object:Gem::Dependency
160
- name: pry
161
- requirement: !ruby/object:Gem::Requirement
162
- requirements:
163
- - - ">="
164
- - !ruby/object:Gem::Version
165
- version: '0'
166
- type: :development
167
- prerelease: false
168
- version_requirements: !ruby/object:Gem::Requirement
169
- requirements:
170
- - - ">="
171
- - !ruby/object:Gem::Version
172
- version: '0'
173
- - !ruby/object:Gem::Dependency
174
- name: pry-byebug
175
- requirement: !ruby/object:Gem::Requirement
176
- requirements:
177
- - - ">="
178
- - !ruby/object:Gem::Version
179
- version: '0'
180
- type: :development
181
- prerelease: false
182
- version_requirements: !ruby/object:Gem::Requirement
183
- requirements:
184
- - - ">="
185
- - !ruby/object:Gem::Version
186
- version: '0'
187
139
  - !ruby/object:Gem::Dependency
188
140
  name: parallel_tests
189
141
  requirement: !ruby/object:Gem::Requirement
@@ -219,12 +171,6 @@ executables: []
219
171
  extensions: []
220
172
  extra_rdoc_files: []
221
173
  files:
222
- - ".github/ISSUE_TEMPLATE/issue-report.md"
223
- - ".github/contributing.md"
224
- - ".github/issue_template.md"
225
- - ".github/workflows/unittest.yml"
226
- - ".gitignore"
227
- - ".rubocop.yml"
228
174
  - CHANGELOG.md
229
175
  - Gemfile
230
176
  - LICENSE.txt
@@ -232,16 +178,8 @@ files:
232
178
  - Rakefile
233
179
  - Thorfile
234
180
  - appium_lib_core.gemspec
235
- - azure-pipelines.yml
236
181
  - bin/console
237
182
  - bin/setup
238
- - ci-jobs/functional/android_setup.yml
239
- - ci-jobs/functional/ios_setup.yml
240
- - ci-jobs/functional/publish_test_result.yml
241
- - ci-jobs/functional/run_appium.yml
242
- - ci-jobs/functional/start-emulator.sh
243
- - ci-jobs/functional_test.yml
244
- - docs/mobile_command.md
245
183
  - lib/appium_lib_core.rb
246
184
  - lib/appium_lib_core/android.rb
247
185
  - lib/appium_lib_core/android/device.rb
@@ -261,19 +199,19 @@ files:
261
199
  - lib/appium_lib_core/common.rb
262
200
  - lib/appium_lib_core/common/base.rb
263
201
  - lib/appium_lib_core/common/base/bridge.rb
264
- - lib/appium_lib_core/common/base/bridge/mjsonwp.rb
265
- - lib/appium_lib_core/common/base/bridge/w3c.rb
266
202
  - lib/appium_lib_core/common/base/capabilities.rb
267
- - lib/appium_lib_core/common/base/command.rb
203
+ - lib/appium_lib_core/common/base/device_ime.rb
268
204
  - lib/appium_lib_core/common/base/driver.rb
205
+ - lib/appium_lib_core/common/base/driver_settings.rb
206
+ - lib/appium_lib_core/common/base/has_location.rb
207
+ - lib/appium_lib_core/common/base/has_network_connection.rb
269
208
  - lib/appium_lib_core/common/base/http_default.rb
270
209
  - lib/appium_lib_core/common/base/platform.rb
210
+ - lib/appium_lib_core/common/base/remote_status.rb
211
+ - lib/appium_lib_core/common/base/rotable.rb
271
212
  - lib/appium_lib_core/common/base/screenshot.rb
272
213
  - lib/appium_lib_core/common/base/search_context.rb
273
214
  - lib/appium_lib_core/common/command.rb
274
- - lib/appium_lib_core/common/command/common.rb
275
- - lib/appium_lib_core/common/command/mjsonwp.rb
276
- - lib/appium_lib_core/common/command/w3c.rb
277
215
  - lib/appium_lib_core/common/device/app_management.rb
278
216
  - lib/appium_lib_core/common/device/app_state.rb
279
217
  - lib/appium_lib_core/common/device/battery_status.rb
@@ -287,6 +225,7 @@ files:
287
225
  - lib/appium_lib_core/common/device/ime_actions.rb
288
226
  - lib/appium_lib_core/common/device/keyboard.rb
289
227
  - lib/appium_lib_core/common/device/keyevent.rb
228
+ - lib/appium_lib_core/common/device/orientation.rb
290
229
  - lib/appium_lib_core/common/device/screen_record.rb
291
230
  - lib/appium_lib_core/common/device/setting.rb
292
231
  - lib/appium_lib_core/common/device/touch_actions.rb
@@ -301,6 +240,7 @@ files:
301
240
  - lib/appium_lib_core/common/ws/websocket.rb
302
241
  - lib/appium_lib_core/device.rb
303
242
  - lib/appium_lib_core/driver.rb
243
+ - lib/appium_lib_core/element.rb
304
244
  - lib/appium_lib_core/ios.rb
305
245
  - lib/appium_lib_core/ios/device.rb
306
246
  - lib/appium_lib_core/ios/device/clipboard.rb
@@ -313,19 +253,20 @@ files:
313
253
  - lib/appium_lib_core/ios/xcuitest/device/performance.rb
314
254
  - lib/appium_lib_core/ios/xcuitest/device/screen.rb
315
255
  - lib/appium_lib_core/ios_xcuitest.rb
316
- - lib/appium_lib_core/patch.rb
256
+ - lib/appium_lib_core/mac2.rb
257
+ - lib/appium_lib_core/mac2/bridge.rb
258
+ - lib/appium_lib_core/mac2/device.rb
259
+ - lib/appium_lib_core/mac2/device/screen.rb
317
260
  - lib/appium_lib_core/version.rb
318
261
  - lib/appium_lib_core/windows.rb
319
262
  - lib/appium_lib_core/windows/bridge.rb
320
263
  - lib/appium_lib_core/windows/device.rb
321
264
  - lib/appium_lib_core/windows/device/screen.rb
322
- - release_notes.md
323
- - script/commands.rb
324
265
  homepage: https://github.com/appium/ruby_lib_core/
325
266
  licenses:
326
267
  - Apache-2.0
327
268
  metadata: {}
328
- post_install_message:
269
+ post_install_message:
329
270
  rdoc_options: []
330
271
  require_paths:
331
272
  - lib
@@ -333,15 +274,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
333
274
  requirements:
334
275
  - - ">="
335
276
  - !ruby/object:Gem::Version
336
- version: '2.4'
277
+ version: '2.7'
337
278
  required_rubygems_version: !ruby/object:Gem::Requirement
338
279
  requirements:
339
280
  - - ">="
340
281
  - !ruby/object:Gem::Version
341
282
  version: '0'
342
283
  requirements: []
343
- rubygems_version: 3.1.2
344
- signing_key:
284
+ rubygems_version: 3.3.3
285
+ signing_key:
345
286
  specification_version: 4
346
287
  summary: Minimal Ruby library for Appium.
347
288
  test_files: []
@@ -1,29 +0,0 @@
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
@@ -1,26 +0,0 @@
1
- # Contributing
2
-
3
- For features or bug fixes, please submit a pull request. Ideally there would be a test as well. The remainder of this doc details how to run the tests.
4
-
5
- ## Tests
6
- ### Unit Tests
7
- - `rake test:unit` run on Travis automatically
8
-
9
- ### Functional Tests
10
- - iOS
11
- - `rake test:func:ios`
12
- - Android
13
- - `rake test:func:android`
14
-
15
- ## Merge
16
- - Squash and merge when we merge PRs to the master
17
-
18
- ## Publishing on rubygems
19
-
20
- 0. Ensure you have `~/.gem/credentials` If not run [the following command](http://guides.rubygems.org/make-your-own-gem/) (replace username with your rubygems user)
21
- > $ curl -u username https://rubygems.org/api/v1/api_key.yaml >
22
- ~/.gem/credentials; chmod 0600 ~/.gem/credentials
23
-
24
- 1. Bump the version number `thor bump`
25
- 2. Generate release note, build and publish gem with `thor release`
26
- 3. Update `changelog.md`
@@ -1,20 +0,0 @@
1
- ## This is a
2
- * [ ] Bug report
3
- * [ ] Question
4
- * [ ] Feature Request
5
-
6
- ## Summary
7
-
8
- ## Environment
9
- * `ruby_lib_core` version:
10
- * Mobile platform/version/device under test:
11
-
12
- ## Actual behaviour and steps to reproduce
13
-
14
- ## Expected behaviour
15
-
16
- ## Link to Appium/Ruby logs
17
-
18
- Create a [GIST](https://gist.github.com) which is a paste of your _full_ Appium logs, and link them here.
19
-
20
- ## Any additional comments
@@ -1,68 +0,0 @@
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.4, 2.5, 2.6, 2.7, 3.0]
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.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/.gitignore DELETED
@@ -1,18 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /docs/
8
- /pkg/
9
- /spec/reports/
10
- /tmp/
11
-
12
- # for Mac
13
- .DS_Store
14
-
15
- # for IDE
16
- .idea
17
-
18
- .coverage
data/.rubocop.yml DELETED
@@ -1,58 +0,0 @@
1
- AllCops:
2
- TargetRubyVersion: 2.4
3
- Layout/LineLength:
4
- Max: 128
5
- Layout/RescueEnsureAlignment:
6
- Enabled: false
7
- Layout/EmptyLinesAroundAttributeAccessor:
8
- Enabled: false
9
- Layout/EmptyLineBetweenDefs:
10
- Enabled: false
11
- Layout/HashAlignment:
12
- Enabled: false
13
- Metrics/MethodLength:
14
- Enabled: false
15
- Metrics/ModuleLength:
16
- Enabled: false
17
- Metrics/ClassLength:
18
- Enabled: false
19
- Metrics/AbcSize:
20
- Enabled: false
21
- Metrics/CyclomaticComplexity:
22
- Max: 14
23
- Metrics/PerceivedComplexity:
24
- Max: 14
25
- Metrics/ParameterLists:
26
- Enabled: false
27
- Lint/NestedMethodDefinition:
28
- Enabled: false
29
- Style/ZeroLengthPredicate:
30
- Enabled: false
31
- Style/Documentation:
32
- Enabled: false
33
- Style/CommentedKeyword:
34
- Enabled: false
35
- Style/PercentLiteralDelimiters:
36
- Enabled: false
37
- Style/SymbolArray:
38
- Enabled: false
39
- Style/UnpackFirst:
40
- Enabled: false
41
- Naming/AccessorMethodName:
42
- Enabled: false
43
- Naming/MemoizedInstanceVariableName:
44
- Enabled: true
45
- Exclude:
46
- - test/**/*
47
- Naming/RescuedExceptionsVariableName:
48
- Enabled: false
49
- Style/CaseLikeIf:
50
- Enabled: false
51
- Style/RedundantRegexpEscape:
52
- Enabled: false
53
- Style/OptionalBooleanParameter:
54
- Enabled: false
55
- Style/ExplicitBlockArgument:
56
- Enabled: false
57
- Style/KeywordParametersOrder:
58
- Enabled: false
data/azure-pipelines.yml DELETED
@@ -1,15 +0,0 @@
1
- # Ruby
2
- # Package your Ruby project.
3
- # Add steps that install rails, analyze code, save build artifacts, deploy, and more:
4
- # https://docs.microsoft.com/azure/devops/pipelines/languages/ruby
5
- jobs:
6
- - template: ./ci-jobs/functional_test.yml
7
-
8
- # Runs tests nightly to make sure they works against appium@beta
9
- schedules:
10
- - cron: "0 0 * * *"
11
- displayName: Daily Nightly build (UTC)
12
- branches:
13
- include:
14
- - master
15
- always: true
@@ -1,3 +0,0 @@
1
- steps:
2
- - script: bash ci-jobs/functional/start-emulator.sh
3
- displayName: Create and run Emulator
@@ -1,7 +0,0 @@
1
- steps:
2
- - script: sudo xcode-select -s /Applications/Xcode_${{ parameters.xcodeVersion }}.app/Contents/Developer
3
- displayName: Xcode Select ${{ parameters.xcodeVersion }}
4
- - script: xcrun simctl list
5
- displayName: List Installed Simulators
6
- - script: defaults write com.apple.iphonesimulator PasteboardAutomaticSync -bool false
7
- displayName: Disable pasteboard automatic sync
@@ -1,18 +0,0 @@
1
- steps:
2
- - task: PublishTestResults@2
3
- condition: always()
4
- inputs:
5
- testResultsFiles: 'test/reports/TEST-AppiumLibCoreTest*.xml'
6
- testRunTitle: '$(Agent.JobName)'
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: '$(Agent.JobName)'
@@ -1,25 +0,0 @@
1
- steps:
2
- - task: NodeTool@0
3
- inputs:
4
- versionSpec: 10.x
5
- displayName: Install Node 10.x
6
- - script: npm install -g appium@${APPIUM_VERSION}
7
- displayName: Install appium beta
8
- - script: npm install -g mjpeg-consumer
9
- displayName: Install MJPEG Consumer
10
- - script: npm list --depth 2 -g || echo 'ok'
11
- displayName: Installed node dependencies
12
- - task: UseRubyVersion@0
13
- inputs:
14
- versionSpec: '2.7'
15
- - script: |
16
- mkdir -p test/report
17
- nohup appium --relaxed-security --log-timestamp --log-no-colors > test/report/appium.out 2>&1 &
18
- displayName: Run Appium in background
19
- env:
20
- JAVA_HOME: $(JAVA_HOME_11_X64)
21
- PATH: $(JAVA_HOME_11_X64)/bin:$(PATH)
22
- - script: |
23
- gem install bundler;
24
- bundle install --retry=3 --jobs=4 --path vendor/bundle;
25
- displayName: Install Gems
@@ -1,26 +0,0 @@
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 -accel auto -no-boot-anim -gpu auto -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"