appium_lib_core 4.1.0 → 5.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/.github/dependabot.yml +8 -0
  3. data/.github/workflows/codeql-analysis.yml +70 -0
  4. data/.github/workflows/unittest.yml +8 -9
  5. data/.rubocop.yml +95 -1
  6. data/CHANGELOG.md +94 -276
  7. data/README.md +11 -6
  8. data/Rakefile +4 -0
  9. data/appium_lib_core.gemspec +4 -7
  10. data/bin/console +0 -4
  11. data/ci-jobs/functional/run_appium.yml +3 -3
  12. data/ci-jobs/functional_test.yml +3 -3
  13. data/docs/mobile_command.md +2 -2
  14. data/lib/appium_lib_core/android/device/auth_finger_print.rb +2 -1
  15. data/lib/appium_lib_core/android/device.rb +4 -4
  16. data/lib/appium_lib_core/common/base/bridge.rb +297 -90
  17. data/lib/appium_lib_core/common/base/capabilities.rb +10 -3
  18. data/lib/appium_lib_core/common/base/device_ime.rb +49 -0
  19. data/lib/appium_lib_core/common/base/driver.rb +183 -171
  20. data/lib/appium_lib_core/common/base/driver_settings.rb +51 -0
  21. data/lib/appium_lib_core/common/base/has_location.rb +80 -0
  22. data/lib/appium_lib_core/common/base/has_network_connection.rb +56 -0
  23. data/lib/appium_lib_core/common/base/http_default.rb +1 -3
  24. data/lib/appium_lib_core/common/base/remote_status.rb +31 -0
  25. data/lib/appium_lib_core/common/base/rotable.rb +54 -0
  26. data/lib/appium_lib_core/common/base/screenshot.rb +6 -6
  27. data/lib/appium_lib_core/common/base/search_context.rb +19 -4
  28. data/lib/appium_lib_core/common/base.rb +1 -3
  29. data/lib/appium_lib_core/common/command.rb +257 -4
  30. data/lib/appium_lib_core/common/device/image_comparison.rb +12 -4
  31. data/lib/appium_lib_core/common/device/keyevent.rb +4 -4
  32. data/lib/appium_lib_core/common/{command/mjsonwp.rb → device/orientation.rb} +14 -11
  33. data/lib/appium_lib_core/common/device/touch_actions.rb +2 -0
  34. data/lib/appium_lib_core/common/device/value.rb +6 -6
  35. data/lib/appium_lib_core/common/error.rb +4 -1
  36. data/lib/appium_lib_core/common/log.rb +4 -1
  37. data/lib/appium_lib_core/common/touch_action/multi_touch.rb +19 -0
  38. data/lib/appium_lib_core/common/touch_action/touch_actions.rb +16 -2
  39. data/lib/appium_lib_core/common/wait.rb +38 -6
  40. data/lib/appium_lib_core/device.rb +1 -5
  41. data/lib/appium_lib_core/driver.rb +30 -46
  42. data/lib/appium_lib_core/{patch.rb → element.rb} +66 -9
  43. data/lib/appium_lib_core/ios/uiautomation/patch.rb +1 -1
  44. data/lib/appium_lib_core/{common/base/command.rb → mac2/bridge.rb} +9 -8
  45. data/lib/appium_lib_core/mac2/device/screen.rb +48 -0
  46. data/lib/appium_lib_core/mac2/device.rb +92 -0
  47. data/lib/appium_lib_core/mac2.rb +17 -0
  48. data/lib/appium_lib_core/version.rb +2 -2
  49. data/lib/appium_lib_core.rb +2 -5
  50. data/release_notes.md +132 -0
  51. data/script/commands.rb +3 -37
  52. metadata +27 -68
  53. data/lib/appium_lib_core/common/base/bridge/mjsonwp.rb +0 -81
  54. data/lib/appium_lib_core/common/base/bridge/w3c.rb +0 -252
  55. data/lib/appium_lib_core/common/command/common.rb +0 -110
  56. data/lib/appium_lib_core/common/command/w3c.rb +0 -56
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5328494c785b852424a9ba61e627ed78c54c4bca6baf2643f16a647f4edfcf22
4
- data.tar.gz: 130869ab5ca0d2967f98b5beed348d3e31bb7c90eb5219da60f2d8f973e8a381
3
+ metadata.gz: e643028012001727a3587bf56c533a58f3156cb54a33ce6ae76344032b6eba2b
4
+ data.tar.gz: e267c16743d9ae2054c82aaf2af36743eadcf11405cda1bc65d0988e2a0b019d
5
5
  SHA512:
6
- metadata.gz: 48aae8b8e934edac9f178cc365825605fc40c7ff63a36e8e7cfe7baf7c815ec89dfecf60350dff401dcfdac80f1e892c86022659b65fc7000c55f7e4fa3b0243
7
- data.tar.gz: 4cc0a6c8eb8b1258a6e7df79666ed4dd21cf3f6cae8c613fd5e3a34a11f15f7614151f296931205bc55d2c817cef298d682e6eb6dc95fb3ee826a864d39350f2
6
+ metadata.gz: 2e433f4df5d820edd9a8625b0e53e3d16eb498310e3d7891ae4f5002bae518488a4595398a294b3f2a7a7a81d84dce0ded6ede87289d5a47f6a5a6f9a4ca0656
7
+ data.tar.gz: 07ccc1ce6007394bb72328cfd0f2f7ed292f0456177baef9dc9aec999ba511565dcd9635f10c5ce7e43383a115801d5d3c728a52a08c20a254558d4752ddc863
@@ -0,0 +1,8 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ time: "11:00"
8
+ open-pull-requests-limit: 10
@@ -0,0 +1,70 @@
1
+ # For most projects, this workflow file will not need changing; you simply need
2
+ # to commit it to your repository.
3
+ #
4
+ # You may wish to alter this file to override the set of languages analyzed,
5
+ # or to provide custom queries or build logic.
6
+ #
7
+ # ******** NOTE ********
8
+ # We have attempted to detect the languages in your repository. Please check
9
+ # the `language` matrix defined below to confirm you have the correct set of
10
+ # supported CodeQL languages.
11
+ #
12
+ name: "CodeQL"
13
+
14
+ on:
15
+ push:
16
+ branches: [ master ]
17
+ pull_request:
18
+ # The branches below must be a subset of the branches above
19
+ branches: [ master ]
20
+ schedule:
21
+ - cron: '39 12 * * 0'
22
+
23
+ jobs:
24
+ analyze:
25
+ name: Analyze
26
+ runs-on: ubuntu-latest
27
+ permissions:
28
+ actions: read
29
+ contents: read
30
+ security-events: write
31
+
32
+ strategy:
33
+ fail-fast: false
34
+ matrix:
35
+ language: [ 'ruby' ]
36
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
37
+ # Learn more about CodeQL language support at https://git.io/codeql-language-support
38
+
39
+ steps:
40
+ - name: Checkout repository
41
+ uses: actions/checkout@v2
42
+
43
+ # Initializes the CodeQL tools for scanning.
44
+ - name: Initialize CodeQL
45
+ uses: github/codeql-action/init@v1
46
+ with:
47
+ languages: ${{ matrix.language }}
48
+ # If you wish to specify custom queries, you can do so here or in a config file.
49
+ # By default, queries listed here will override any specified in a config file.
50
+ # Prefix the list here with "+" to use these queries and those in the config file.
51
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
52
+
53
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
54
+ # If this step fails, then you should remove it and run the build manually (see below)
55
+ - name: Autobuild
56
+ uses: github/codeql-action/autobuild@v1
57
+
58
+ # ℹ️ Command-line programs to run using the OS shell.
59
+ # 📚 https://git.io/JvXDl
60
+
61
+ # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
62
+ # and modify them (or add more) to build your code if your project
63
+ # uses a compiled language
64
+
65
+ #- run: |
66
+ # make bootstrap
67
+ # make release
68
+
69
+ - name: Perform CodeQL Analysis
70
+ uses: github/codeql-action/analyze@v1
@@ -11,7 +11,7 @@ jobs:
11
11
  strategy:
12
12
  fail-fast: false
13
13
  matrix:
14
- ruby: [2.4, 2.5, 2.6, 2.7, 3.0]
14
+ ruby: [2.6, 2.7, 3.0]
15
15
 
16
16
  runs-on: ubuntu-latest
17
17
 
@@ -29,16 +29,15 @@ jobs:
29
29
  - name: Run tests
30
30
  run: |
31
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
32
+ bundle exec rake test:unit
33
+ AUTOMATION_NAME_DROID=espresso bundle exec rake test:unit:android
34
+ AUTOMATION_NAME_DROID=appium AUTOMATION_NAME_IOS=appium bundle exec rake test:unit
35
35
 
36
36
  test-win:
37
37
  strategy:
38
38
  fail-fast: false
39
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]
40
+ ruby: [2.6, 2.7, 3.0]
42
41
 
43
42
  runs-on: windows-latest
44
43
 
@@ -58,11 +57,11 @@ jobs:
58
57
  gem uninstall --force eventmachine && gem install eventmachine --platform ruby
59
58
  - name: Run tests
60
59
  run: |
61
- parallel_test test/unit/ -n 4
60
+ rake test:unit
62
61
 
63
62
  setx AUTOMATION_NAME_DROID espresso
64
- parallel_test test/unit/android -n 4
63
+ rake test:unit:android
65
64
 
66
65
  setx AUTOMATION_NAME_DROID appium
67
66
  setx AUTOMATION_NAME_IOS appium
68
- parallel_test test/unit -n 4
67
+ rake test:unit
data/.rubocop.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  AllCops:
2
- TargetRubyVersion: 2.4
2
+ TargetRubyVersion: 2.6
3
3
  Layout/LineLength:
4
4
  Max: 128
5
5
  Layout/RescueEnsureAlignment:
@@ -56,3 +56,97 @@ Style/ExplicitBlockArgument:
56
56
  Enabled: false
57
57
  Style/KeywordParametersOrder:
58
58
  Enabled: false
59
+ Gemspec/DateAssignment:
60
+ Enabled: true
61
+ Gemspec/RequireMFA:
62
+ Enabled: true
63
+ Layout/LineEndStringConcatenationIndentation:
64
+ Enabled: true
65
+ Layout/SpaceBeforeBrackets:
66
+ Enabled: true
67
+ Lint/AmbiguousAssignment:
68
+ Enabled: true
69
+ Lint/AmbiguousOperatorPrecedence:
70
+ Enabled: false
71
+ Lint/AmbiguousRange:
72
+ Enabled: true
73
+ Lint/DeprecatedConstants:
74
+ Enabled: true
75
+ Lint/DuplicateBranch:
76
+ Enabled: true
77
+ Lint/DuplicateRegexpCharacterClassElement:
78
+ Enabled: true
79
+ Lint/EmptyBlock:
80
+ Enabled: true
81
+ Lint/EmptyClass:
82
+ Enabled: true
83
+ Lint/EmptyInPattern:
84
+ Enabled: true
85
+ Lint/IncompatibleIoSelectWithFiberScheduler:
86
+ Enabled: true
87
+ Lint/LambdaWithoutLiteralBlock:
88
+ Enabled: true
89
+ Lint/NoReturnInBeginEndBlocks:
90
+ Enabled: true
91
+ Lint/NumberedParameterAssignment:
92
+ Enabled: true
93
+ Lint/OrAssignmentToConstant:
94
+ Enabled: true
95
+ Lint/RedundantDirGlobSort:
96
+ Enabled: true
97
+ Lint/RequireRelativeSelfPath:
98
+ Enabled: true
99
+ Lint/SymbolConversion:
100
+ Enabled: true
101
+ Lint/ToEnumArguments:
102
+ Enabled: true
103
+ Lint/TripleQuotes:
104
+ Enabled: true
105
+ Lint/UnexpectedBlockArity:
106
+ Enabled: true
107
+ Lint/UnmodifiedReduceAccumulator:
108
+ Enabled: true
109
+ Lint/UselessRuby2Keywords:
110
+ Enabled: true
111
+ Security/IoMethods:
112
+ Enabled: true
113
+ Style/ArgumentsForwarding:
114
+ Enabled: true
115
+ Style/CollectionCompact:
116
+ Enabled: true
117
+ Style/DocumentDynamicEvalDefinition:
118
+ Enabled: true
119
+ Style/EndlessMethod:
120
+ Enabled: true
121
+ Style/HashConversion:
122
+ Enabled: true
123
+ Style/HashExcept:
124
+ Enabled: true
125
+ Style/IfWithBooleanLiteralBranches:
126
+ Enabled: true
127
+ Style/InPatternThen:
128
+ Enabled: true
129
+ Style/MultilineInPatternThen:
130
+ Enabled: true
131
+ Style/NegatedIfElseCondition:
132
+ Enabled: true
133
+ Style/NilLambda:
134
+ Enabled: true
135
+ Style/NumberedParameters:
136
+ Enabled: true
137
+ Style/NumberedParametersLimit:
138
+ Enabled: true
139
+ Style/QuotedSymbols:
140
+ Enabled: true
141
+ Style/RedundantArgument:
142
+ Enabled: true
143
+ Style/RedundantSelfAssignmentBranch:
144
+ Enabled: true
145
+ Style/SelectByRegexp:
146
+ Enabled: true
147
+ Style/StringChars:
148
+ Enabled: true
149
+ Style/SwapValues:
150
+ Enabled: true
151
+ Style/OpenStructUse:
152
+ Enabled: true