appium_lib_core 9.1.3 → 9.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +10 -0
  3. data/README.md +3 -1
  4. data/Rakefile +5 -0
  5. data/Steepfile +11 -0
  6. data/appium_lib_core.gemspec +2 -1
  7. data/lib/appium_lib_core/android/device/clipboard.rb +4 -2
  8. data/lib/appium_lib_core/android/device/emulator.rb +11 -5
  9. data/lib/appium_lib_core/android/device/screen.rb +3 -1
  10. data/lib/appium_lib_core/android/device.rb +3 -3
  11. data/lib/appium_lib_core/common/base/capabilities.rb +1 -1
  12. data/lib/appium_lib_core/common/base/screenshot.rb +2 -2
  13. data/lib/appium_lib_core/common/device/image_comparison.rb +15 -6
  14. data/lib/appium_lib_core/common/device/screen_record.rb +8 -2
  15. data/lib/appium_lib_core/common/error.rb +1 -0
  16. data/lib/appium_lib_core/driver.rb +21 -11
  17. data/lib/appium_lib_core/element.rb +1 -1
  18. data/lib/appium_lib_core/ios/device/clipboard.rb +4 -2
  19. data/lib/appium_lib_core/version.rb +2 -2
  20. data/rbs_collection.lock.yaml +252 -0
  21. data/rbs_collection.yaml +15 -0
  22. data/sig/gems/selenium/abstract_event_listener.rbs +8 -0
  23. data/sig/gems/selenium/capabilities.rbs +8 -0
  24. data/sig/gems/selenium/common.rbs +10 -0
  25. data/sig/gems/selenium/default.rbs +10 -0
  26. data/sig/gems/selenium/driver.rbs +7 -0
  27. data/sig/gems/selenium/has_session_id.rbs +8 -0
  28. data/sig/gems/selenium/has_web_storage.rbs +8 -0
  29. data/sig/gems/selenium/uploads_files.rbs +8 -0
  30. data/sig/lib/appium_lib_core/common/base/capabilities.rbs +9 -0
  31. data/sig/lib/appium_lib_core/common/base/driver.rbs +167 -0
  32. data/sig/lib/appium_lib_core/common/base/driver_settings.rbs +15 -0
  33. data/sig/lib/appium_lib_core/common/base/has_location.rbs +13 -0
  34. data/sig/lib/appium_lib_core/common/base/has_network_connection.rbs +19 -0
  35. data/sig/lib/appium_lib_core/common/base/http_default.rbs +38 -0
  36. data/sig/lib/appium_lib_core/common/base/platform.rbs +7 -0
  37. data/sig/lib/appium_lib_core/common/base/remote_status.rbs +9 -0
  38. data/sig/lib/appium_lib_core/common/base/rotable.rbs +17 -0
  39. data/sig/lib/appium_lib_core/common/base/screenshot.rbs +19 -0
  40. data/sig/lib/appium_lib_core/common/device/battery_status.rbs +13 -0
  41. data/sig/lib/appium_lib_core/common/wait.rbs +31 -0
  42. data/sig/lib/appium_lib_core/device.rbs +21 -0
  43. data/sig/lib/appium_lib_core/driver.rbs +200 -0
  44. data/sig/lib/appium_lib_core/ios/xcuitest/device/battery.rbs +15 -0
  45. data/sig/lib/appium_lib_core/version.rbs +7 -0
  46. data/sig/lib/appium_lib_core.rbs +8 -0
  47. metadata +46 -4
@@ -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,200 @@
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 quit_driver: () -> void
164
+
165
+ def appium_server_version: () -> Hash[String, String]
166
+
167
+ private
168
+
169
+ def convert_to_symbol: (untyped? value) -> Symbol
170
+
171
+ def extend_for: (device: Symbol | String, automation_name: Symbol) -> self
172
+
173
+ extend Core
174
+
175
+ extend Core::Device
176
+
177
+ def get_caps: (Hash[Symbol, Symbol | String | Hash[Symbol, String | Numeric] | Numeric]? opts)
178
+ -> Core::Base::Capabilities
179
+
180
+ def get_appium_lib_opts: (Hash[Symbol, Symbol | String | Hash[Symbol, String | Numeric] | Numeric]? opts)
181
+ -> (Symbol | String | Hash[Symbol, String | Numeric] | Numeric)
182
+
183
+ def get_app: () -> String?
184
+
185
+ def set_app_path: () -> String?
186
+
187
+ def set_appium_lib_specific_values: (
188
+ Hash[Symbol, Symbol | String | Hash[Symbol, String | Numeric] | Numeric]? appium_lib_opts
189
+ ) -> self
190
+
191
+ def set_appium_device: () -> String
192
+
193
+ def set_automation_name: () -> Symbol?
194
+
195
+ def convert_downcase: (Symbol value) -> Symbol
196
+
197
+ def set_automation_name_if_nil: () -> Symbol?
198
+ end
199
+ end
200
+ end