appium_lib_core 9.2.0 → 9.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/Rakefile +5 -0
  4. data/Steepfile +11 -0
  5. data/appium_lib_core.gemspec +3 -2
  6. data/lib/appium_lib_core/common/base/driver.rb +0 -3
  7. data/lib/appium_lib_core/driver.rb +13 -36
  8. data/lib/appium_lib_core/version.rb +2 -2
  9. data/rbs_collection.lock.yaml +252 -0
  10. data/rbs_collection.yaml +15 -0
  11. data/sig/gems/selenium/abstract_event_listener.rbs +8 -0
  12. data/sig/gems/selenium/capabilities.rbs +8 -0
  13. data/sig/gems/selenium/common.rbs +10 -0
  14. data/sig/gems/selenium/default.rbs +10 -0
  15. data/sig/gems/selenium/driver.rbs +7 -0
  16. data/sig/gems/selenium/has_session_id.rbs +8 -0
  17. data/sig/gems/selenium/has_web_storage.rbs +8 -0
  18. data/sig/gems/selenium/uploads_files.rbs +8 -0
  19. data/sig/lib/appium_lib_core/common/base/capabilities.rbs +9 -0
  20. data/sig/lib/appium_lib_core/common/base/driver.rbs +167 -0
  21. data/sig/lib/appium_lib_core/common/base/driver_settings.rbs +15 -0
  22. data/sig/lib/appium_lib_core/common/base/has_location.rbs +13 -0
  23. data/sig/lib/appium_lib_core/common/base/has_network_connection.rbs +19 -0
  24. data/sig/lib/appium_lib_core/common/base/http_default.rbs +38 -0
  25. data/sig/lib/appium_lib_core/common/base/platform.rbs +7 -0
  26. data/sig/lib/appium_lib_core/common/base/remote_status.rbs +9 -0
  27. data/sig/lib/appium_lib_core/common/base/rotable.rbs +17 -0
  28. data/sig/lib/appium_lib_core/common/base/screenshot.rbs +19 -0
  29. data/sig/lib/appium_lib_core/common/device/battery_status.rbs +13 -0
  30. data/sig/lib/appium_lib_core/common/wait.rbs +31 -0
  31. data/sig/lib/appium_lib_core/device.rbs +21 -0
  32. data/sig/lib/appium_lib_core/driver.rbs +196 -0
  33. data/sig/lib/appium_lib_core/ios/xcuitest/device/battery.rbs +15 -0
  34. data/sig/lib/appium_lib_core/version.rbs +7 -0
  35. data/sig/lib/appium_lib_core.rbs +8 -0
  36. metadata +48 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 51fd1b5928d24942e7f5f944099c63728960f27cdab978cde119fe2ee68b0d73
4
- data.tar.gz: 2d64236e6c3ed7501b260894e0fcbd58b16f6bf552e7f962c55331517e6d602b
3
+ metadata.gz: 6cbb4ee69acc82f871f944c1f9a264682bf5e5df40f52e3b2c3c4e3aa7d332a8
4
+ data.tar.gz: a2e938bd25a58ef654d16de4d2369306c7961b156e06070afa04177a24ecd14b
5
5
  SHA512:
6
- metadata.gz: e10e20452f9dcbfc61e96e2dc1545de62b3baf549d36d0a87383dbfec1a3de12ee5aabf2ecc956fbf279baf74fc0e151c8d87238effad36acda81420b81048e1
7
- data.tar.gz: 10fc303ae86844b8be9eb778c7395832ffa65a6eee4786d1d0684f554016483a48d5ddf1e1c5be3735c681bbc81b84321a2bfbc880a864bf7d3c934831fc2682
6
+ metadata.gz: 87f66fdbcbc1371b5d6f67e79f44634d947e3f843b840f293c54caa4b35e50e564cd7d1e144c178d2bb547234b03e809fa8174798fa3a4e0b23d51216052d2e7
7
+ data.tar.gz: e196444af88a493c70737d2bc186feb542365c6d783bcd355de51fad42adbb8bc2285f477ae2996141b1494d5f01521cc04778cf6382941750699838d68608f4
data/CHANGELOG.md CHANGED
@@ -10,6 +10,16 @@ Read `release_notes.md` for commit level details.
10
10
 
11
11
  ### Deprecations
12
12
 
13
+ ## [9.3.0] - 2024-12-08
14
+
15
+ ### Deprecations
16
+ - Remove deprecated `Appium::Core#quit_driver`. Please use `Appium::Core::Driver.quit` instead.
17
+
18
+ # [9.2.1] - 2024-08-01
19
+
20
+ ### Bug fixes
21
+ - Fix to return symbols for `Core#device` and `Core#automation_name`
22
+
13
23
  ## [9.2.0] - 2024-07-21
14
24
  ### Enhancements
15
25
  - Raise defined errors in this library instead of Ruby general errors in some places.
data/Rakefile CHANGED
@@ -117,3 +117,8 @@ RuboCop::RakeTask.new(:rubocop) do |t|
117
117
  t.options = %w(-D)
118
118
  t.fail_on_error = true
119
119
  end
120
+
121
+ desc('Run Steep type check')
122
+ task :steep do
123
+ system('steep check')
124
+ end
data/Steepfile ADDED
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ target :lib do
4
+ signature 'sig'
5
+ check 'lib' # Directory name
6
+
7
+ # Standard libraries used in the project
8
+ library(
9
+ 'forwardable'
10
+ )
11
+ end
@@ -29,9 +29,10 @@ Gem::Specification.new do |spec|
29
29
  spec.add_development_dependency 'minitest-reporters', '~> 1.1'
30
30
  spec.add_development_dependency 'parallel_tests'
31
31
  spec.add_development_dependency 'rake', '~> 13.0'
32
- spec.add_development_dependency 'rubocop', '1.65.0'
32
+ spec.add_development_dependency 'rubocop', '1.69.1'
33
33
  spec.add_development_dependency 'simplecov'
34
- spec.add_development_dependency 'webmock', '~> 3.23.0'
34
+ spec.add_development_dependency 'steep', '~> 1.7.0'
35
+ spec.add_development_dependency 'webmock', '~> 3.24.0'
35
36
  spec.add_development_dependency 'yard', '~> 0.9.11'
36
37
  spec.metadata['rubygems_mfa_required'] = 'true'
37
38
  end
@@ -193,9 +193,6 @@ module Appium
193
193
  raise ::Appium::Core::Error::ArgumentError, "Available method is either #{AVAILABLE_METHODS}"
194
194
  end
195
195
 
196
- # TODO: Remove this logger before Appium 2.0 release
197
- ::Appium::Logger.info '[Experimental] this method is experimental for Appium 2.0. This interface may change.'
198
-
199
196
  @bridge.add_command method: method, url: url, name: name, &block
200
197
  end
201
198
 
@@ -104,7 +104,7 @@ module Appium
104
104
  class Driver
105
105
  include Waitable
106
106
 
107
- # Selenium webdriver capabilities
107
+ # Selenium webdriver capabilities, but the value is provided capabilities basis.
108
108
  # @return [Core::Base::Capabilities]
109
109
  attr_reader :caps
110
110
 
@@ -125,7 +125,7 @@ module Appium
125
125
 
126
126
  # Automation name sent to appium server or received by server.<br>
127
127
  # If automation_name is <code>nil</code>, it is not set both client side and server side.
128
- # @return [Hash]
128
+ # @return [Symbol]
129
129
  attr_reader :automation_name
130
130
 
131
131
  # Custom URL for the selenium server. If set this attribute, ruby_lib_core try to handshake to the custom url.<br>
@@ -394,7 +394,6 @@ module Appium
394
394
 
395
395
  def start_driver(server_url: nil,
396
396
  http_client_ops: { http_client: nil, open_timeout: 999_999, read_timeout: 999_999 })
397
-
398
397
  @custom_url ||= "http://127.0.0.1:#{@port}/wd/hub"
399
398
  @custom_url = server_url unless server_url.nil?
400
399
 
@@ -431,12 +430,6 @@ module Appium
431
430
  @http_client.delete_additional_header Appium::Core::Base::Http::RequestHeaders::KEYS[:idempotency]
432
431
  end
433
432
 
434
- # TODO: this method can be removed after releasing Appium 2.0, and after a while
435
- # since Appium 2.0 reuqires 'automationName'. This method won't help anymore then.
436
- # If "automationName" is set only server side, this method set "automationName" attribute into @automation_name.
437
- # Since @automation_name is set only client side before start_driver is called.
438
- set_automation_name_if_nil
439
-
440
433
  set_implicit_wait_by_default(@default_wait)
441
434
 
442
435
  @driver
@@ -446,7 +439,6 @@ module Appium
446
439
  # Attach to an existing session
447
440
  def attach_to(session_id, url: nil, automation_name: nil, platform_name: nil,
448
441
  http_client_ops: { http_client: nil, open_timeout: 999_999, read_timeout: 999_999 })
449
-
450
442
  raise ::Appium::Core::Error::ArgumentError, 'The :url must not be nil' if url.nil?
451
443
  raise ::Appium::Core::Error::ArgumentError, 'The :automation_name must not be nil' if automation_name.nil?
452
444
  raise ::Appium::Core::Error::ArgumentError, 'The :platform_name must not be nil' if platform_name.nil?
@@ -500,20 +492,6 @@ module Appium
500
492
  {}
501
493
  end
502
494
 
503
- # [Deprecated] Quits the driver. This method is the same as @driver.quit
504
- # @return [void]
505
- #
506
- # @example
507
- #
508
- # @core.quit_driver
509
- #
510
- def quit_driver
511
- ::Appium::Logger.warn('[DEPRECATION] quit_driver will be removed. Please use @driver.quit instead.')
512
- @driver.quit
513
- rescue # rubocop:disable Style/RescueStandardError
514
- nil
515
- end
516
-
517
495
  # Returns the server's version info. This method calls +driver.remote_status+ internally
518
496
  #
519
497
  # @return [Hash]
@@ -634,7 +612,7 @@ module Appium
634
612
 
635
613
  # @private
636
614
  def get_app
637
- @caps[:app] || @caps['app']
615
+ get_cap 'app'
638
616
  end
639
617
 
640
618
  # @private
@@ -678,17 +656,17 @@ module Appium
678
656
  # @private
679
657
  def set_appium_device
680
658
  # https://code.google.com/p/selenium/source/browse/spec-draft.md?repo=mobile
681
- @device = @caps[:platformName] || @caps['platformName']
659
+ @device = get_cap 'platformName'
682
660
  return @device unless @device
683
661
 
684
- @device = convert_downcase @device
662
+ @device = convert_to_symbol(convert_downcase(@device))
685
663
  end
686
664
 
687
665
  # @private
688
666
  def set_automation_name
689
- candidate = @caps[:automationName] || @caps['automationName']
667
+ candidate = get_cap 'automationName'
690
668
  @automation_name = candidate if candidate
691
- @automation_name = convert_downcase @automation_name if @automation_name
669
+ @automation_name = convert_to_symbol(convert_downcase(@automation_name)) if @automation_name
692
670
  end
693
671
 
694
672
  # @private
@@ -696,13 +674,12 @@ module Appium
696
674
  value.is_a?(Symbol) ? value.downcase : value.downcase.strip.intern
697
675
  end
698
676
 
699
- # @private
700
- def set_automation_name_if_nil
701
- return unless @automation_name.nil?
702
-
703
- @automation_name = if @driver.capabilities['automationName']
704
- @driver.capabilities['automationName'].downcase.strip.intern
705
- end
677
+ def get_cap(name)
678
+ name_with_prefix = "#{::Appium::Core::Base::Bridge::APPIUM_PREFIX}#{name}"
679
+ @caps[convert_to_symbol name] ||
680
+ @caps[name] ||
681
+ @caps[convert_to_symbol name_with_prefix] ||
682
+ @caps[name_with_prefix]
706
683
  end
707
684
  end # class Driver
708
685
  end # module Core
@@ -14,7 +14,7 @@
14
14
 
15
15
  module Appium
16
16
  module Core
17
- VERSION = '9.2.0' unless defined? ::Appium::Core::VERSION
18
- DATE = '2024-07-21' unless defined? ::Appium::Core::DATE
17
+ VERSION = '9.3.0' unless defined? ::Appium::Core::VERSION
18
+ DATE = '2024-12-08' unless defined? ::Appium::Core::DATE
19
19
  end
20
20
  end
@@ -0,0 +1,252 @@
1
+ ---
2
+ path: ".gem_rbs_collection"
3
+ gems:
4
+ - name: activesupport
5
+ version: '7.0'
6
+ source:
7
+ type: git
8
+ name: ruby/gem_rbs_collection
9
+ revision: 3670834268f4ea9c10aefeffae7e072b51256375
10
+ remote: https://github.com/ruby/gem_rbs_collection.git
11
+ repo_dir: gems
12
+ - name: addressable
13
+ version: '2.8'
14
+ source:
15
+ type: git
16
+ name: ruby/gem_rbs_collection
17
+ revision: 3670834268f4ea9c10aefeffae7e072b51256375
18
+ remote: https://github.com/ruby/gem_rbs_collection.git
19
+ repo_dir: gems
20
+ - name: ast
21
+ version: '2.4'
22
+ source:
23
+ type: git
24
+ name: ruby/gem_rbs_collection
25
+ revision: 3670834268f4ea9c10aefeffae7e072b51256375
26
+ remote: https://github.com/ruby/gem_rbs_collection.git
27
+ repo_dir: gems
28
+ - name: base64
29
+ version: '0'
30
+ source:
31
+ type: stdlib
32
+ - name: bigdecimal
33
+ version: '0'
34
+ source:
35
+ type: stdlib
36
+ - name: concurrent-ruby
37
+ version: '1.1'
38
+ source:
39
+ type: git
40
+ name: ruby/gem_rbs_collection
41
+ revision: 3670834268f4ea9c10aefeffae7e072b51256375
42
+ remote: https://github.com/ruby/gem_rbs_collection.git
43
+ repo_dir: gems
44
+ - name: connection_pool
45
+ version: '2.4'
46
+ source:
47
+ type: git
48
+ name: ruby/gem_rbs_collection
49
+ revision: 3670834268f4ea9c10aefeffae7e072b51256375
50
+ remote: https://github.com/ruby/gem_rbs_collection.git
51
+ repo_dir: gems
52
+ - name: csv
53
+ version: '0'
54
+ source:
55
+ type: stdlib
56
+ - name: date
57
+ version: '0'
58
+ source:
59
+ type: stdlib
60
+ - name: erb
61
+ version: '0'
62
+ source:
63
+ type: stdlib
64
+ - name: ffi
65
+ version: 1.17.0
66
+ source:
67
+ type: rubygems
68
+ - name: fileutils
69
+ version: '0'
70
+ source:
71
+ type: stdlib
72
+ - name: forwardable
73
+ version: '0'
74
+ source:
75
+ type: stdlib
76
+ - name: hashdiff
77
+ version: '1.1'
78
+ source:
79
+ type: git
80
+ name: ruby/gem_rbs_collection
81
+ revision: 3670834268f4ea9c10aefeffae7e072b51256375
82
+ remote: https://github.com/ruby/gem_rbs_collection.git
83
+ repo_dir: gems
84
+ - name: i18n
85
+ version: '1.10'
86
+ source:
87
+ type: git
88
+ name: ruby/gem_rbs_collection
89
+ revision: 3670834268f4ea9c10aefeffae7e072b51256375
90
+ remote: https://github.com/ruby/gem_rbs_collection.git
91
+ repo_dir: gems
92
+ - name: json
93
+ version: '0'
94
+ source:
95
+ type: stdlib
96
+ - name: listen
97
+ version: '3.9'
98
+ source:
99
+ type: git
100
+ name: ruby/gem_rbs_collection
101
+ revision: 3670834268f4ea9c10aefeffae7e072b51256375
102
+ remote: https://github.com/ruby/gem_rbs_collection.git
103
+ repo_dir: gems
104
+ - name: logger
105
+ version: '0'
106
+ source:
107
+ type: stdlib
108
+ - name: minitest
109
+ version: '0'
110
+ source:
111
+ type: stdlib
112
+ - name: monitor
113
+ version: '0'
114
+ source:
115
+ type: stdlib
116
+ - name: mutex_m
117
+ version: '0'
118
+ source:
119
+ type: stdlib
120
+ - name: optparse
121
+ version: '0'
122
+ source:
123
+ type: stdlib
124
+ - name: parallel
125
+ version: '1.20'
126
+ source:
127
+ type: git
128
+ name: ruby/gem_rbs_collection
129
+ revision: 3670834268f4ea9c10aefeffae7e072b51256375
130
+ remote: https://github.com/ruby/gem_rbs_collection.git
131
+ repo_dir: gems
132
+ - name: parser
133
+ version: '3.2'
134
+ source:
135
+ type: git
136
+ name: ruby/gem_rbs_collection
137
+ revision: 3670834268f4ea9c10aefeffae7e072b51256375
138
+ remote: https://github.com/ruby/gem_rbs_collection.git
139
+ repo_dir: gems
140
+ - name: rainbow
141
+ version: '3.0'
142
+ source:
143
+ type: git
144
+ name: ruby/gem_rbs_collection
145
+ revision: 3670834268f4ea9c10aefeffae7e072b51256375
146
+ remote: https://github.com/ruby/gem_rbs_collection.git
147
+ repo_dir: gems
148
+ - name: rake
149
+ version: '13.0'
150
+ source:
151
+ type: git
152
+ name: ruby/gem_rbs_collection
153
+ revision: 3670834268f4ea9c10aefeffae7e072b51256375
154
+ remote: https://github.com/ruby/gem_rbs_collection.git
155
+ repo_dir: gems
156
+ - name: regexp_parser
157
+ version: '2.8'
158
+ source:
159
+ type: git
160
+ name: ruby/gem_rbs_collection
161
+ revision: 3670834268f4ea9c10aefeffae7e072b51256375
162
+ remote: https://github.com/ruby/gem_rbs_collection.git
163
+ repo_dir: gems
164
+ - name: ripper
165
+ version: '0'
166
+ source:
167
+ type: stdlib
168
+ - name: rubocop
169
+ version: '1.57'
170
+ source:
171
+ type: git
172
+ name: ruby/gem_rbs_collection
173
+ revision: 3670834268f4ea9c10aefeffae7e072b51256375
174
+ remote: https://github.com/ruby/gem_rbs_collection.git
175
+ repo_dir: gems
176
+ - name: rubocop-ast
177
+ version: '1.30'
178
+ source:
179
+ type: git
180
+ name: ruby/gem_rbs_collection
181
+ revision: 3670834268f4ea9c10aefeffae7e072b51256375
182
+ remote: https://github.com/ruby/gem_rbs_collection.git
183
+ repo_dir: gems
184
+ - name: rubyzip
185
+ version: '2.3'
186
+ source:
187
+ type: git
188
+ name: ruby/gem_rbs_collection
189
+ revision: 3670834268f4ea9c10aefeffae7e072b51256375
190
+ remote: https://github.com/ruby/gem_rbs_collection.git
191
+ repo_dir: gems
192
+ - name: securerandom
193
+ version: '0'
194
+ source:
195
+ type: stdlib
196
+ - name: simplecov
197
+ version: '0.22'
198
+ source:
199
+ type: git
200
+ name: ruby/gem_rbs_collection
201
+ revision: 3670834268f4ea9c10aefeffae7e072b51256375
202
+ remote: https://github.com/ruby/gem_rbs_collection.git
203
+ repo_dir: gems
204
+ - name: singleton
205
+ version: '0'
206
+ source:
207
+ type: stdlib
208
+ - name: strscan
209
+ version: '0'
210
+ source:
211
+ type: stdlib
212
+ - name: thor
213
+ version: '1.2'
214
+ source:
215
+ type: git
216
+ name: ruby/gem_rbs_collection
217
+ revision: 3670834268f4ea9c10aefeffae7e072b51256375
218
+ remote: https://github.com/ruby/gem_rbs_collection.git
219
+ repo_dir: gems
220
+ - name: time
221
+ version: '0'
222
+ source:
223
+ type: stdlib
224
+ - name: timeout
225
+ version: '0'
226
+ source:
227
+ type: stdlib
228
+ - name: tzinfo
229
+ version: '2.0'
230
+ source:
231
+ type: git
232
+ name: ruby/gem_rbs_collection
233
+ revision: 3670834268f4ea9c10aefeffae7e072b51256375
234
+ remote: https://github.com/ruby/gem_rbs_collection.git
235
+ repo_dir: gems
236
+ - name: webmock
237
+ version: '3.19'
238
+ source:
239
+ type: git
240
+ name: ruby/gem_rbs_collection
241
+ revision: 3670834268f4ea9c10aefeffae7e072b51256375
242
+ remote: https://github.com/ruby/gem_rbs_collection.git
243
+ repo_dir: gems
244
+ - name: yard
245
+ version: '0.9'
246
+ source:
247
+ type: git
248
+ name: ruby/gem_rbs_collection
249
+ revision: 3670834268f4ea9c10aefeffae7e072b51256375
250
+ remote: https://github.com/ruby/gem_rbs_collection.git
251
+ repo_dir: gems
252
+ gemfile_lock_path: Gemfile.lock
@@ -0,0 +1,15 @@
1
+ # Download sources
2
+ sources:
3
+ - name: ruby/gem_rbs_collection
4
+ remote: https://github.com/ruby/gem_rbs_collection.git
5
+ revision: main
6
+ repo_dir: gems
7
+
8
+ # A directory to install the downloaded RBSs
9
+ path: .gem_rbs_collection
10
+
11
+ gems:
12
+ # Skip loading rbs gem's RBS.
13
+ # It's unnecessary if you don't use rbs as a library.
14
+ - name: rbs
15
+ ignore: true
@@ -0,0 +1,8 @@
1
+ module Selenium
2
+ module WebDriver
3
+ module Support
4
+ class AbstractEventListener
5
+ end
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module Selenium
2
+ module WebDriver
3
+ module Remote
4
+ class Capabilities
5
+ end
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,10 @@
1
+ module Selenium
2
+ module WebDriver
3
+ module Remote
4
+ module Http
5
+ class Common
6
+ end
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,10 @@
1
+ module Selenium
2
+ module WebDriver
3
+ module Remote
4
+ module Http
5
+ class Default
6
+ end
7
+ end
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,7 @@
1
+ module Selenium
2
+ module WebDriver
3
+ class Driver
4
+ def capabilities: () -> untyped
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,8 @@
1
+ module Selenium
2
+ module WebDriver
3
+ module DriverExtensions
4
+ module HasSessionId
5
+ end
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module Selenium
2
+ module WebDriver
3
+ module DriverExtensions
4
+ module HasWebStorage
5
+ end
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,8 @@
1
+ module Selenium
2
+ module WebDriver
3
+ module DriverExtensions
4
+ module UploadsFiles
5
+ end
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,9 @@
1
+ module Appium
2
+ module Core
3
+ class Base
4
+ class Capabilities < Selenium::WebDriver::Remote::Capabilities
5
+ def convert_key: (untyped key) -> untyped
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,167 @@
1
+ module Appium
2
+ module Core
3
+ class Base
4
+ class Driver < Selenium::WebDriver::Driver
5
+ @wait_timeout: untyped
6
+
7
+ @wait_interval: untyped
8
+
9
+ @devtools: untyped
10
+
11
+ @bidi: untyped
12
+
13
+ @bridge: untyped
14
+
15
+ @settings: untyped
16
+
17
+ @ime: untyped
18
+
19
+ @logs: untyped
20
+
21
+ include Selenium::WebDriver::DriverExtensions::UploadsFiles
22
+
23
+ include Selenium::WebDriver::DriverExtensions::HasSessionId
24
+
25
+ include Selenium::WebDriver::DriverExtensions::HasWebStorage
26
+
27
+ include Base::Rotatable
28
+
29
+ include Base::TakesScreenshot
30
+
31
+ include Base::HasRemoteStatus
32
+
33
+ include Base::HasLocation
34
+
35
+ include Base::HasNetworkConnection
36
+
37
+ include Core::Waitable
38
+
39
+ attr_reader bridge: untyped
40
+
41
+ def initialize: (?bridge: untyped?, ?listener: untyped?, **untyped opts) -> void
42
+
43
+ private
44
+
45
+ def create_bridge: (**untyped opts) -> untyped
46
+
47
+ public
48
+
49
+ def update_sending_request_to: (protocol: untyped, host: untyped, port: untyped, path: untyped) -> (nil | untyped)
50
+
51
+ AVAILABLE_METHODS: ::Array[:get | :head | :post | :put | :delete | :connect | :options | :trace | :patch]
52
+
53
+ def add_command: (method: untyped, url: untyped, name: untyped) { () -> untyped } -> untyped
54
+
55
+ def key_action: (?async: bool) -> untyped
56
+
57
+ def lock: (?untyped? duration) -> untyped
58
+
59
+ def locked?: () -> untyped
60
+
61
+ alias device_locked? locked?
62
+
63
+ def unlock: () -> untyped
64
+
65
+ def hide_keyboard: (?untyped? close_key, ?untyped? strategy) -> untyped
66
+
67
+ def keyboard_shown?: () -> untyped
68
+
69
+ alias is_keyboard_shown keyboard_shown?
70
+
71
+ def settings: () -> untyped
72
+
73
+ def get_settings: () -> untyped
74
+
75
+ def settings=: (untyped value) -> untyped
76
+
77
+ alias update_settings settings=
78
+
79
+ def ime: () -> untyped
80
+
81
+ def ime_activate: (untyped ime_name) -> untyped
82
+
83
+ def ime_available_engines: () -> untyped
84
+
85
+ def ime_active_engine: () -> untyped
86
+
87
+ def ime_activated: () -> untyped
88
+
89
+ def ime_deactivate: () -> untyped
90
+
91
+ def within_context: (untyped context) ?{ () -> untyped } -> untyped
92
+
93
+ def current_context: () -> untyped
94
+
95
+ def available_contexts: () -> untyped
96
+
97
+ def context=: (?untyped? context) -> untyped
98
+
99
+ alias set_context context=
100
+
101
+ def push_file: (untyped path, untyped filedata) -> untyped
102
+
103
+ def pull_file: (untyped path) -> untyped
104
+
105
+ def pull_folder: (untyped path) -> untyped
106
+
107
+ def press_keycode: (untyped key, ?metastate: untyped, ?flags: untyped) -> untyped
108
+
109
+ def long_press_keycode: (untyped key, ?metastate: untyped, ?flags: untyped) -> untyped
110
+
111
+ def app_strings: (?untyped? language) -> untyped
112
+
113
+ def background_app: (?::Integer duration) -> untyped
114
+
115
+ def install_app: (untyped path, **untyped options) -> untyped
116
+
117
+ def remove_app: (untyped app_id, ?keep_data: untyped?, ?timeout: untyped?) -> untyped
118
+
119
+ def app_installed?: (untyped app_id) -> untyped
120
+
121
+ def activate_app: (untyped app_id) -> untyped
122
+
123
+ def terminate_app: (untyped app_id, ?timeout: untyped?) -> untyped
124
+
125
+ def app_state: (untyped app_id) -> untyped
126
+
127
+ alias query_app_state app_state
128
+
129
+ def stop_recording_screen: (?remote_path: untyped?, ?user: untyped?, ?pass: untyped?, ?method: ::String) -> untyped
130
+
131
+ def stop_and_save_recording_screen: (untyped file_path) -> untyped
132
+
133
+ def shake: () -> untyped
134
+
135
+ def device_time: (?untyped? format) -> untyped
136
+
137
+ def perform_actions: (untyped data) -> nil
138
+
139
+ def window_size: () -> untyped
140
+
141
+ def window_rect: () -> untyped
142
+
143
+ def back: () -> untyped
144
+
145
+ def logs: () -> untyped
146
+
147
+ def get_timeouts: () -> untyped
148
+
149
+ def match_images_features: (first_image: untyped, second_image: untyped, ?detector_name: ::String, ?match_func: ::String, ?good_matches_factor: untyped?, ?visualize: bool) -> untyped
150
+
151
+ def find_image_occurrence: (full_image: untyped, partial_image: untyped, ?visualize: bool, ?threshold: untyped?, ?multiple: untyped?, ?match_neighbour_threshold: untyped?) -> untyped
152
+
153
+ def get_images_similarity: (first_image: untyped, second_image: untyped, ?visualize: bool) -> untyped
154
+
155
+ def compare_images: (first_image: untyped, second_image: untyped, ?mode: ::Symbol, ?options: untyped?) -> untyped
156
+
157
+ def find_element_by_image: (untyped img_path) -> untyped
158
+
159
+ def find_elements_by_image: (untyped img_path) -> untyped
160
+
161
+ def execute_driver: (?script: ::String, ?type: ::String, ?timeout_ms: untyped?) -> untyped
162
+
163
+ def convert_to_element: (untyped response_id) -> untyped
164
+ end
165
+ end
166
+ end
167
+ end
@@ -0,0 +1,15 @@
1
+ module Appium
2
+ module Core
3
+ class Base
4
+ class DriverSettings
5
+ @bridge: untyped
6
+
7
+ def initialize: (untyped bridge) -> void
8
+
9
+ def get: () -> untyped
10
+
11
+ def update: (untyped settings) -> untyped
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,13 @@
1
+ module Appium
2
+ module Core
3
+ class Base
4
+ module HasLocation
5
+ def location: () -> untyped
6
+
7
+ def location=: (untyped location) -> untyped
8
+
9
+ def set_location: (untyped latitude, untyped longitude, untyped altitude, ?speed: untyped?, ?satellites: untyped?) -> untyped
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,19 @@
1
+ module Appium
2
+ module Core
3
+ class Base
4
+ module HasNetworkConnection
5
+ def network_connection_type: () -> untyped
6
+
7
+ def network_connection_type=: (untyped connection_type) -> untyped
8
+
9
+ private
10
+
11
+ def type_to_values: () -> Hash[Symbol, Integer]
12
+
13
+ def values_to_type: () -> untyped
14
+
15
+ def valid_type?: (untyped type) -> untyped
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,38 @@
1
+ module Appium
2
+ module Core
3
+ class Base
4
+ module Http
5
+ module RequestHeaders
6
+ KEYS: Hash[Symbol, String]
7
+ end
8
+
9
+ class Default < Selenium::WebDriver::Remote::Http::Default
10
+ @open_timeout: untyped
11
+
12
+ @read_timeout: untyped
13
+
14
+ @additional_headers: untyped
15
+
16
+ @http: untyped
17
+
18
+ @server_url: untyped
19
+
20
+ attr_reader additional_headers: untyped
21
+
22
+ # override
23
+ def initialize: (?open_timeout: untyped?, ?read_timeout: untyped?) -> void
24
+
25
+ def set_additional_header: (untyped key, untyped value) -> untyped
26
+
27
+ def delete_additional_header: (untyped key) -> untyped
28
+
29
+ def update_sending_request_to: (scheme: untyped, host: untyped, port: untyped, path: untyped) -> untyped
30
+
31
+ private
32
+
33
+ def validate_url_param: (untyped scheme, untyped host, untyped port, untyped path) -> bool
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,7 @@
1
+ module Appium
2
+ module Core
3
+ class Base
4
+ def self.platform: () -> untyped
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,9 @@
1
+ module Appium
2
+ module Core
3
+ class Base
4
+ module HasRemoteStatus
5
+ def remote_status: () -> untyped
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,17 @@
1
+ module Appium
2
+ module Core
3
+ class Base
4
+ module Rotatable
5
+ ORIENTATIONS: Array[Symbol]
6
+
7
+ def rotation=: (untyped orientation) -> untyped
8
+
9
+ alias rotate rotation=
10
+
11
+ alias orientation= rotation=
12
+
13
+ def orientation: () -> untyped
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,19 @@
1
+ module Appium
2
+ module Core
3
+ class Base
4
+ module TakesScreenshot
5
+ def save_screenshot: (untyped png_path) -> untyped
6
+
7
+ def screenshot_as: (untyped format) -> untyped
8
+
9
+ def save_element_screenshot: (untyped element, untyped png_path) -> untyped
10
+
11
+ alias take_element_screenshot save_element_screenshot
12
+
13
+ def element_screenshot_as: (untyped element, untyped format) -> untyped
14
+
15
+ def save_viewport_screenshot: (untyped png_path) -> untyped
16
+ end
17
+ end
18
+ end
19
+ end
@@ -0,0 +1,13 @@
1
+ module Appium
2
+ module Core
3
+ class Base
4
+ module Device
5
+ module BatteryStatus
6
+ ANDROID: Array[Symbol]
7
+
8
+ IOS: Array[Symbol]
9
+ end
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,31 @@
1
+ module Appium
2
+ module Core
3
+ module Wait
4
+ class TimeoutError < StandardError
5
+ end
6
+
7
+ DEFAULT_TIMEOUT: Integer
8
+
9
+ DEFAULT_INTERVAL: Float
10
+
11
+ def self.until: (?timeout: untyped, ?interval: untyped, ?message: untyped?, ?ignored: untyped?, ?object: untyped?) { (untyped) -> untyped } -> untyped
12
+
13
+ def self.until_true: (?timeout: untyped, ?interval: untyped, ?message: untyped?, ?ignored: untyped?, ?object: untyped?) { (untyped) -> untyped } -> untyped
14
+
15
+ private
16
+
17
+ def self.message_for: (untyped timeout, untyped message) -> untyped
18
+ end
19
+
20
+ module Waitable
21
+
22
+ def wait_until_true: (?timeout: untyped?, ?interval: untyped?, ?message: untyped?, ?ignored: untyped?) { (?) -> untyped } -> untyped
23
+
24
+ alias wait_true wait_until_true
25
+
26
+ def wait_until: (?timeout: untyped?, ?interval: untyped?, ?message: untyped?, ?ignored: untyped?) { (?) -> untyped } -> untyped
27
+
28
+ alias wait wait_until
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,21 @@
1
+ module Appium
2
+ module Core
3
+ module Device
4
+ extend Forwardable
5
+
6
+ def self.extended: (untyped _mod) -> untyped
7
+
8
+ def self.add_endpoint_method: (untyped method) ?{ () -> untyped } -> untyped
9
+
10
+ def self.extend_webdriver_with_forwardable: () -> (nil | untyped)
11
+
12
+ private
13
+
14
+ def self.delegate_from_appium_driver: (untyped method, Symbol? delegation_target) -> (nil | untyped)
15
+
16
+ def self.delegate_driver_method: (untyped method) -> (nil | untyped)
17
+
18
+ def self.create_bridge_command: (untyped method) ?{ () -> untyped } -> untyped
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,196 @@
1
+ module Appium
2
+ Location: Class
3
+
4
+ module Core
5
+ module Android
6
+ end
7
+
8
+ module Ios
9
+ end
10
+
11
+ class Options
12
+ @custom_url: String
13
+
14
+ @default_wait: Integer
15
+
16
+ @enable_idempotency_header: bool
17
+
18
+ @direct_connect: bool
19
+
20
+ @port: Integer
21
+
22
+ @wait_timeout: Integer
23
+
24
+ @wait_interval: Integer
25
+
26
+ @listener: Selenium::WebDriver::Support::AbstractEventListener
27
+
28
+ attr_reader custom_url: String
29
+
30
+ attr_reader default_wait: Integer
31
+
32
+ attr_reader port: Integer
33
+
34
+ attr_reader wait_timeout: Integer
35
+
36
+ attr_reader wait_interval: Integer
37
+
38
+ attr_reader listener: Selenium::WebDriver::Support::AbstractEventListener
39
+
40
+ attr_reader direct_connect: bool
41
+
42
+ attr_reader enable_idempotency_header: bool
43
+
44
+ def initialize: (Hash[Symbol, String] appium_lib_opts) -> void
45
+
46
+ private
47
+
48
+ def default_tmp_appium_lib_session: () -> String
49
+ end
50
+
51
+ class DirectConnections
52
+ @protocol: String
53
+
54
+ @host: String
55
+
56
+ @port: String
57
+
58
+ @path: String
59
+
60
+ KEYS: Hash[String | Symbol, String]
61
+
62
+ W3C_KEYS: Hash[String | Symbol, String]
63
+
64
+ attr_reader protocol: String
65
+
66
+ attr_reader host: String
67
+
68
+ attr_reader port: String
69
+
70
+ attr_reader path: String
71
+
72
+ def initialize: (Hash[String | Symbol, String] capabilities) -> void
73
+ end
74
+
75
+ class Driver
76
+ @delegate_target: self
77
+
78
+ @automation_name: Symbol
79
+
80
+ @custom_url: String
81
+
82
+ @caps: Hash[Symbol | String, Symbol | String | Integer]
83
+
84
+ @http_client: Core::Base::Http::Default
85
+
86
+ @driver: Core::Base::Driver
87
+
88
+ @device: Symbol | String
89
+
90
+ @enable_idempotency_header: bool
91
+
92
+ @default_wait: Integer
93
+
94
+ @port: Integer
95
+
96
+ @wait_timeout: Integer
97
+
98
+ @wait_interval: Integer
99
+
100
+ @listener: Selenium::WebDriver::Support::AbstractEventListener
101
+
102
+ @direct_connect: bool
103
+
104
+ include Waitable
105
+
106
+ attr_reader caps: Base::Capabilities
107
+
108
+ attr_reader http_client: Base::Http::Default
109
+
110
+ attr_reader enable_idempotency_header: bool
111
+
112
+ attr_reader device: Symbol
113
+
114
+ attr_reader automation_name: Symbol
115
+
116
+ attr_reader custom_url: String
117
+
118
+ attr_reader default_wait: Integer
119
+
120
+ attr_reader port: Integer
121
+
122
+ DEFAULT_APPIUM_PORT: Integer
123
+
124
+ attr_reader wait_timeout: Integer
125
+
126
+ attr_reader wait_interval: Integer
127
+
128
+ attr_reader listener: Selenium::WebDriver::Support::AbstractEventListener
129
+
130
+ attr_reader driver: Core::Base::Driver
131
+
132
+ attr_reader direct_connect: bool
133
+
134
+ def self.for: (Hash[Symbol, Symbol | String | Hash[Symbol, String | Numeric] | Numeric] opts) -> Driver
135
+
136
+ def self.attach_to: (
137
+ String session_id,
138
+ ?url: String?,
139
+ ?automation_name: Symbol,
140
+ ?platform_name: String?,
141
+ ?http_client_ops:
142
+ Hash[Symbol, Symbol | String | Hash[Symbol, String | Numeric] | Numeric]
143
+ ) -> Selenium::WebDriver
144
+
145
+ private
146
+
147
+ def delegated_target_for_test: () -> self
148
+
149
+ def initialize: () -> void
150
+
151
+ public
152
+
153
+ def setup_for_new_session: (?Hash[Symbol, Symbol | String | Hash[Symbol, String | Numeric] | Numeric] opts) -> self
154
+
155
+ def start_driver: (?server_url: untyped?, ?http_client_ops: ::Hash[untyped, untyped]) -> untyped
156
+
157
+ def attach_to: (untyped session_id, ?url: untyped?, ?automation_name: Symbol, ?platform_name: untyped?, ?http_client_ops: Hash[untyped, untyped]) -> untyped
158
+
159
+ def get_http_client: (?http_client: untyped?, ?open_timeout: untyped?, ?read_timeout: untyped?) -> untyped
160
+
161
+ def set_implicit_wait_by_default: (untyped wait) -> untyped
162
+
163
+ def appium_server_version: () -> Hash[String, String]
164
+
165
+ private
166
+
167
+ def convert_to_symbol: (untyped? value) -> Symbol
168
+
169
+ def extend_for: (device: Symbol | String, automation_name: Symbol) -> self
170
+
171
+ extend Core
172
+
173
+ extend Core::Device
174
+
175
+ def get_caps: (Hash[Symbol, Symbol | String | Hash[Symbol, String | Numeric] | Numeric]? opts)
176
+ -> Core::Base::Capabilities
177
+
178
+ def get_appium_lib_opts: (Hash[Symbol, Symbol | String | Hash[Symbol, String | Numeric] | Numeric]? opts)
179
+ -> (Symbol | String | Hash[Symbol, String | Numeric] | Numeric)
180
+
181
+ def get_app: () -> String?
182
+
183
+ def set_app_path: () -> String?
184
+
185
+ def set_appium_lib_specific_values: (
186
+ Hash[Symbol, Symbol | String | Hash[Symbol, String | Numeric] | Numeric]? appium_lib_opts
187
+ ) -> self
188
+
189
+ def set_appium_device: () -> String
190
+
191
+ def set_automation_name: () -> Symbol?
192
+
193
+ def convert_downcase: (Symbol value) -> Symbol
194
+ end
195
+ end
196
+ end
@@ -0,0 +1,15 @@
1
+ module Appium
2
+ module Core
3
+ module Ios
4
+ module Xcuitest
5
+ module Device
6
+ module Battery
7
+ def self.add_methods: () -> (Symbol | Hash[Symbol, Proc])?
8
+
9
+ def battery_info: () -> (Symbol | Hash[Symbol, Proc])?
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,7 @@
1
+ module Appium
2
+ module Core
3
+ VERSION: String
4
+
5
+ DATE: String
6
+ end
7
+ end
@@ -0,0 +1,8 @@
1
+ module Appium
2
+ def self.symbolize_keys: (Hash[untyped, untyped] hash, ?nested: bool, ?enable_deprecation_msg: bool)
3
+ -> Hash[Symbol, untyped]
4
+
5
+ module Core
6
+ def self.for: (*untyped args) -> Driver
7
+ end
8
+ end
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: 9.2.0
4
+ version: 9.3.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: 2024-07-21 00:00:00.000000000 Z
11
+ date: 2024-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faye-websocket
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - '='
116
116
  - !ruby/object:Gem::Version
117
- version: 1.65.0
117
+ version: 1.69.1
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - '='
123
123
  - !ruby/object:Gem::Version
124
- version: 1.65.0
124
+ version: 1.69.1
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: simplecov
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -136,20 +136,34 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: steep
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - "~>"
144
+ - !ruby/object:Gem::Version
145
+ version: 1.7.0
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - "~>"
151
+ - !ruby/object:Gem::Version
152
+ version: 1.7.0
139
153
  - !ruby/object:Gem::Dependency
140
154
  name: webmock
141
155
  requirement: !ruby/object:Gem::Requirement
142
156
  requirements:
143
157
  - - "~>"
144
158
  - !ruby/object:Gem::Version
145
- version: 3.23.0
159
+ version: 3.24.0
146
160
  type: :development
147
161
  prerelease: false
148
162
  version_requirements: !ruby/object:Gem::Requirement
149
163
  requirements:
150
164
  - - "~>"
151
165
  - !ruby/object:Gem::Version
152
- version: 3.23.0
166
+ version: 3.24.0
153
167
  - !ruby/object:Gem::Dependency
154
168
  name: yard
155
169
  requirement: !ruby/object:Gem::Requirement
@@ -176,6 +190,7 @@ files:
176
190
  - LICENSE.txt
177
191
  - README.md
178
192
  - Rakefile
193
+ - Steepfile
179
194
  - Thorfile
180
195
  - appium_lib_core.gemspec
181
196
  - bin/console
@@ -255,6 +270,33 @@ files:
255
270
  - lib/appium_lib_core/windows/bridge.rb
256
271
  - lib/appium_lib_core/windows/device.rb
257
272
  - lib/appium_lib_core/windows/device/screen.rb
273
+ - rbs_collection.lock.yaml
274
+ - rbs_collection.yaml
275
+ - sig/gems/selenium/abstract_event_listener.rbs
276
+ - sig/gems/selenium/capabilities.rbs
277
+ - sig/gems/selenium/common.rbs
278
+ - sig/gems/selenium/default.rbs
279
+ - sig/gems/selenium/driver.rbs
280
+ - sig/gems/selenium/has_session_id.rbs
281
+ - sig/gems/selenium/has_web_storage.rbs
282
+ - sig/gems/selenium/uploads_files.rbs
283
+ - sig/lib/appium_lib_core.rbs
284
+ - sig/lib/appium_lib_core/common/base/capabilities.rbs
285
+ - sig/lib/appium_lib_core/common/base/driver.rbs
286
+ - sig/lib/appium_lib_core/common/base/driver_settings.rbs
287
+ - sig/lib/appium_lib_core/common/base/has_location.rbs
288
+ - sig/lib/appium_lib_core/common/base/has_network_connection.rbs
289
+ - sig/lib/appium_lib_core/common/base/http_default.rbs
290
+ - sig/lib/appium_lib_core/common/base/platform.rbs
291
+ - sig/lib/appium_lib_core/common/base/remote_status.rbs
292
+ - sig/lib/appium_lib_core/common/base/rotable.rbs
293
+ - sig/lib/appium_lib_core/common/base/screenshot.rbs
294
+ - sig/lib/appium_lib_core/common/device/battery_status.rbs
295
+ - sig/lib/appium_lib_core/common/wait.rbs
296
+ - sig/lib/appium_lib_core/device.rbs
297
+ - sig/lib/appium_lib_core/driver.rbs
298
+ - sig/lib/appium_lib_core/ios/xcuitest/device/battery.rbs
299
+ - sig/lib/appium_lib_core/version.rbs
258
300
  homepage: https://github.com/appium/ruby_lib_core/
259
301
  licenses:
260
302
  - Apache-2.0