appium_lib_core 5.1.2 → 5.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 02b4dc4e7053fd4d10214334441ab3f1910018ae4ad9fc407dedc356f0bdd7ba
4
- data.tar.gz: 35ed4881f7ac3c221934e5d082ea73ce5ef632c99b30c4363ce367979e5c4dce
3
+ metadata.gz: 9c40ff7aa2c8ad3b9c93cd6e9997aa98bbe62d5118184ce58a802edf7c731ec2
4
+ data.tar.gz: 78eb1cf6946e248a60f0f7b598ab7274add5bbc502f247534ba0d65f14078648
5
5
  SHA512:
6
- metadata.gz: 3888ab02b863794e4290ed2741419ff33131deb7e065054458a43bc05e963e09f2191609cb647640beee2cd47e3df1994ec95c0e700ae06155245244b95aca06
7
- data.tar.gz: cbfd890bad70c6fc5095db493e4c25f91bcbb6fe9371a3b709d87052b231eb1c680f05cef8e4271e7fbf572a7ceb41cfd13bd01b12d6cd7ab077fba88bf76245
6
+ metadata.gz: eecd7b626412b0103ee2bd15ed684d22264a56eac4469adf2b0b3f8ad659c753ba17cbb2009b9ac71168f12636f41aa251962a7889d7bae4673a697c1bce0e63
7
+ data.tar.gz: cc0f29f03d38beca513472101b19dbf36031a3622aa6cd6edb29c3b296a09b1577ffe6d8fc74a0e7766e10eb21dc60a805f977735b47edd088f9934d4b463960
data/CHANGELOG.md CHANGED
@@ -10,6 +10,15 @@ Read `release_notes.md` for commit level details.
10
10
 
11
11
  ### Deprecations
12
12
 
13
+ ## [5.2.0] - 2022-06-19
14
+
15
+ ### Enhancements
16
+
17
+ - Update base Selenium Ruby client to `4.2+`
18
+ - Please call `key_action` or set `[::Selenium::WebDriver::Interactions.key('keyboard')]` as the deviecs parameter to build `driver.send_keys().perform` W3C action.
19
+ - `driver.key_action.send_keys('xxx').perform` instead of `driver.action.send_keys('xxx').perform`, or `driver.action(devices: [::Selenium::WebDriver::Interactions.key('keyboard')]).send_keys('xxx').perform`.
20
+ - [This PR change](https://github.com/appium/ruby_lib_core/pull/381/files) will help to update your some actions.
21
+
13
22
  ## [5.1.2] - 2022-06-02
14
23
 
15
24
  ### Enhancements
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'appium_lib_core/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.required_ruby_version = '>= 2.6'
7
+ spec.required_ruby_version = '>= 2.7'
8
8
 
9
9
  spec.name = 'appium_lib_core'
10
10
  spec.version = Appium::Core::VERSION
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ['lib']
24
24
 
25
- spec.add_runtime_dependency 'selenium-webdriver', '~> 4.0', '< 4.2'
25
+ spec.add_runtime_dependency 'selenium-webdriver', '~> 4.2'
26
26
  spec.add_runtime_dependency 'faye-websocket', '~> 0.11.0'
27
27
 
28
28
  spec.add_development_dependency 'rake', '~> 13.0'
@@ -30,7 +30,7 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency 'minitest', '~> 5.0'
31
31
  spec.add_development_dependency 'minitest-reporters', '~> 1.1'
32
32
  spec.add_development_dependency 'webmock', '~> 3.14.0'
33
- spec.add_development_dependency 'rubocop', '1.30.0'
33
+ spec.add_development_dependency 'rubocop', '1.30.1'
34
34
  spec.add_development_dependency 'appium_thor', '~> 1.0'
35
35
  spec.add_development_dependency 'parallel_tests'
36
36
  spec.add_development_dependency 'simplecov'
@@ -153,30 +153,26 @@ module Appium
153
153
  execute :status
154
154
  end
155
155
 
156
- # Perform touch actions for W3C module.
156
+ # Perform 'touch' actions for W3C module.
157
157
  # Generate +touch+ pointer action here and users can use this via +driver.action+
158
158
  # - https://seleniumhq.github.io/selenium/docs/api/rb/Selenium/WebDriver/W3CActionBuilder.html
159
159
  # - https://seleniumhq.github.io/selenium/docs/api/rb/Selenium/WebDriver/PointerActions.html
160
160
  # - https://seleniumhq.github.io/selenium/docs/api/rb/Selenium/WebDriver/KeyActions.html
161
161
  #
162
- # The pointer type is 'touch' by default in the Appium Ruby client. (The selenium one is 'mouse')
162
+ # The pointer type is 'touch' by default in the Appium Ruby client.
163
163
  #
164
164
  # @example
165
165
  #
166
166
  # element = @driver.find_element(:id, "some id")
167
167
  # @driver.action.click(element).perform # The 'click' is a part of 'PointerActions'
168
168
  #
169
- def action(async = false)
170
- action_builder = ::Selenium::WebDriver::ActionBuilder.new(
169
+ def action(_deprecated_async = nil, async: false, devices: nil)
170
+ ::Selenium::WebDriver::ActionBuilder.new(
171
171
  self,
172
- ::Selenium::WebDriver::Interactions.pointer(:touch, name: 'touch'),
173
- ::Selenium::WebDriver::Interactions.key('keyboard'),
174
- async
172
+ devices: devices || [::Selenium::WebDriver::Interactions.pointer(:touch, name: 'touch')],
173
+ async: async,
174
+ duration: 50 # milliseconds
175
175
  )
176
- # Used for default duration of each touch actions.
177
- # Override from 250 milliseconds to 50 milliseconds in PointerActions included by ::Selenium::WebDriver::ActionBuilder
178
- action_builder.default_move_duration = 0.05
179
- action_builder
180
176
  end
181
177
 
182
178
  # Port from MJSONWP
@@ -181,6 +181,31 @@ module Appium
181
181
 
182
182
  ### Methods for Appium
183
183
 
184
+ # Perform 'key' actions for W3C module.
185
+ # Generate +key+ pointer action here and users can use this via +driver.key_action+
186
+ # - https://seleniumhq.github.io/selenium/docs/api/rb/Selenium/WebDriver/W3CActionBuilder.html
187
+ # - https://seleniumhq.github.io/selenium/docs/api/rb/Selenium/WebDriver/KeyActions.html
188
+ #
189
+ # The pointer type is 'key' by default in the Appium Ruby client.
190
+ # +driver.action+ in Appium Ruby client has 'pointer' action by default.
191
+ # This method is a shortcut to set 'key' type.
192
+ # Hense this method is equal to +driver.action(devices: [::Selenium::WebDriver::Interactions.key('keyboard')])+
193
+ # as below example.
194
+ #
195
+ # @example
196
+ #
197
+ # element = @driver.find_element(:id, "some id")
198
+ # @driver.key_action.send_key('hiあ').perform # The 'send_key' is a part of 'KeyActions'
199
+ # # is equal to:
200
+ # # @driver.action(devices: [::Selenium::WebDriver::Interactions.key('keyboard')]).send_keys('hiあ').perform
201
+ #
202
+ def key_action(async: false)
203
+ @bridge.action(
204
+ async: async,
205
+ devices: [::Selenium::WebDriver::Interactions.key('keyboard')]
206
+ )
207
+ end
208
+
184
209
  # Lock the device
185
210
  # @return [String]
186
211
  #
@@ -14,7 +14,7 @@
14
14
 
15
15
  module Appium
16
16
  module Core
17
- VERSION = '5.1.2' unless defined? ::Appium::Core::VERSION
18
- DATE = '2022-06-02' unless defined? ::Appium::Core::DATE
17
+ VERSION = '5.2.0' unless defined? ::Appium::Core::VERSION
18
+ DATE = '2022-06-19' unless defined? ::Appium::Core::DATE
19
19
  end
20
20
  end
metadata CHANGED
@@ -1,23 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appium_lib_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.2
4
+ version: 5.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kazuaki MATSUO
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-06-03 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
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '4.0'
20
- - - "<"
21
18
  - !ruby/object:Gem::Version
22
19
  version: '4.2'
23
20
  type: :runtime
@@ -25,9 +22,6 @@ dependencies:
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
24
  - - "~>"
28
- - !ruby/object:Gem::Version
29
- version: '4.0'
30
- - - "<"
31
25
  - !ruby/object:Gem::Version
32
26
  version: '4.2'
33
27
  - !ruby/object:Gem::Dependency
@@ -120,14 +114,14 @@ dependencies:
120
114
  requirements:
121
115
  - - '='
122
116
  - !ruby/object:Gem::Version
123
- version: 1.30.0
117
+ version: 1.30.1
124
118
  type: :development
125
119
  prerelease: false
126
120
  version_requirements: !ruby/object:Gem::Requirement
127
121
  requirements:
128
122
  - - '='
129
123
  - !ruby/object:Gem::Version
130
- version: 1.30.0
124
+ version: 1.30.1
131
125
  - !ruby/object:Gem::Dependency
132
126
  name: appium_thor
133
127
  requirement: !ruby/object:Gem::Requirement
@@ -280,7 +274,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
280
274
  requirements:
281
275
  - - ">="
282
276
  - !ruby/object:Gem::Version
283
- version: '2.6'
277
+ version: '2.7'
284
278
  required_rubygems_version: !ruby/object:Gem::Requirement
285
279
  requirements:
286
280
  - - ">="