appium_lib_core 11.0.1 → 11.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/Gemfile +1 -1
  4. data/README.md +26 -6
  5. data/appium_lib_core.gemspec +1 -1
  6. data/lib/appium_lib_core/common/base/bidi_bridge.rb +96 -0
  7. data/lib/appium_lib_core/common/base/driver.rb +28 -2
  8. data/lib/appium_lib_core/common/base.rb +2 -1
  9. data/lib/appium_lib_core/common/device/app_management.rb +1 -1
  10. data/lib/appium_lib_core/common/device/keyboard.rb +1 -1
  11. data/lib/appium_lib_core/driver.rb +2 -2
  12. data/lib/appium_lib_core/version.rb +2 -2
  13. data/sig/gems/em.rbs +5 -0
  14. data/sig/gems/faye.rbs +10 -0
  15. data/sig/gems/selenium/atoms.rbs +16 -0
  16. data/sig/gems/selenium/bidi/browsing_context.rbs +27 -0
  17. data/sig/gems/selenium/bidi/browsing_context_info.rbs +25 -0
  18. data/sig/gems/selenium/bidi/log_inspector.rbs +33 -0
  19. data/sig/gems/selenium/bidi/navigate_result.rbs +17 -0
  20. data/sig/gems/selenium/bidi/session.rbs +19 -0
  21. data/sig/gems/selenium/bridge.rbs +275 -0
  22. data/sig/gems/selenium/chrome/features.rbs +16 -0
  23. data/sig/gems/selenium/chromium/features.rbs +42 -0
  24. data/sig/gems/selenium/common/element.rbs +65 -0
  25. data/sig/gems/selenium/edge/features.rbs +17 -0
  26. data/sig/gems/selenium/error.rbs +9 -0
  27. data/sig/gems/selenium/event_firing_bridge.rbs +47 -0
  28. data/sig/gems/selenium/firefox/driver.rbs +21 -0
  29. data/sig/gems/selenium/firefox/extension.rbs +31 -0
  30. data/sig/gems/selenium/firefox/features.rbs +25 -0
  31. data/sig/gems/selenium/firefox/options.rbs +8 -0
  32. data/sig/gems/selenium/firefox/profile.rbs +77 -0
  33. data/sig/gems/selenium/firefox/profiles_ini.rbs +23 -0
  34. data/sig/gems/selenium/firefox/service.rbs +6 -0
  35. data/sig/gems/selenium/firefox/util.rbs +12 -0
  36. data/sig/gems/selenium/ie/features.rbs +13 -0
  37. data/sig/gems/selenium/interactions.rbs +11 -0
  38. data/sig/gems/selenium/interfaces/commands.rbs +3 -0
  39. data/sig/gems/selenium/interfaces/commands_list.rbs +3 -0
  40. data/sig/gems/selenium/interfaces/devtools.rbs +3 -0
  41. data/sig/gems/selenium/interfaces/driver.rbs +17 -0
  42. data/sig/gems/selenium/interfaces/features.rbs +3 -0
  43. data/sig/gems/selenium/local_driver.rbs +11 -0
  44. data/sig/gems/selenium/platform.rbs +6 -0
  45. data/sig/gems/selenium/profile_helper.rbs +6 -0
  46. data/sig/gems/selenium/{default.rbs → remote/bridge/commands.rbs} +2 -3
  47. data/sig/gems/selenium/{capabilities.rbs → remote/capabilities.rbs} +2 -2
  48. data/sig/gems/selenium/remote/http/common.rbs +39 -0
  49. data/sig/gems/selenium/remote/http/default.rbs +48 -0
  50. data/sig/gems/selenium/{common.rbs → remote/response.rbs} +1 -3
  51. data/sig/gems/selenium/safari/features.rbs +23 -0
  52. data/sig/gems/selenium/search_context.rbs +17 -0
  53. data/sig/interfaces/bridge.rbs +5 -0
  54. data/sig/lib/appium_lib_core/android/device/auth_finger_print.rbs +13 -0
  55. data/sig/lib/appium_lib_core/android/device/clipboard.rbs +13 -0
  56. data/sig/lib/appium_lib_core/android/device/emulator.rbs +23 -0
  57. data/sig/lib/appium_lib_core/android/device/network.rbs +13 -0
  58. data/sig/lib/appium_lib_core/android/device/performance.rbs +13 -0
  59. data/sig/lib/appium_lib_core/android/device/screen.rbs +11 -0
  60. data/sig/lib/appium_lib_core/android/device.rbs +13 -0
  61. data/sig/lib/appium_lib_core/android/espresso/bridge.rbs +11 -0
  62. data/sig/lib/appium_lib_core/android/uiautomator1/bridge.rbs +11 -0
  63. data/sig/lib/appium_lib_core/android/uiautomator2/bridge.rbs +11 -0
  64. data/sig/lib/appium_lib_core/android/uiautomator2/device/battery.rbs +13 -0
  65. data/sig/lib/appium_lib_core/common/base/bidi_bridge.rbs +25 -0
  66. data/sig/lib/appium_lib_core/common/base/bridge.rbs +206 -0
  67. data/sig/lib/appium_lib_core/common/base/device_ime.rbs +25 -0
  68. data/sig/lib/appium_lib_core/common/base/remote_status.rbs +2 -0
  69. data/sig/lib/appium_lib_core/common/base/screenshot.rbs +2 -0
  70. data/sig/lib/appium_lib_core/common/base/search_context.rbs +9 -0
  71. data/sig/lib/appium_lib_core/common/command.rbs +13 -0
  72. data/sig/lib/appium_lib_core/common/device/app_management.rbs +29 -0
  73. data/sig/lib/appium_lib_core/common/device/app_state.rbs +15 -0
  74. data/sig/lib/appium_lib_core/common/device/clipboard_content_type.rbs +11 -0
  75. data/sig/lib/appium_lib_core/common/device/context.rbs +19 -0
  76. data/sig/lib/appium_lib_core/common/device/device.rbs +15 -0
  77. data/sig/lib/appium_lib_core/common/device/device_lock.rbs +17 -0
  78. data/sig/lib/appium_lib_core/common/device/execute_driver.rbs +25 -0
  79. data/sig/lib/appium_lib_core/common/device/file_management.rbs +17 -0
  80. data/sig/lib/appium_lib_core/common/device/image_comparison.rbs +27 -0
  81. data/sig/lib/appium_lib_core/common/device/ime_actions.rbs +21 -0
  82. data/sig/lib/appium_lib_core/common/device/keyboard.rbs +15 -0
  83. data/sig/lib/appium_lib_core/common/device/keyevent.rbs +17 -0
  84. data/sig/lib/appium_lib_core/common/device/orientation.rbs +15 -0
  85. data/sig/lib/appium_lib_core/common/device/screen_record.rbs +23 -0
  86. data/sig/lib/appium_lib_core/common/device/setting.rbs +15 -0
  87. data/sig/lib/appium_lib_core/common/error.rbs +26 -0
  88. data/sig/lib/appium_lib_core/common/log.rbs +19 -0
  89. data/sig/lib/appium_lib_core/common/logger.rbs +23 -0
  90. data/sig/lib/appium_lib_core/common/wait/timer.rbs +15 -0
  91. data/sig/lib/appium_lib_core/common/ws/websocket.rbs +103 -0
  92. data/sig/lib/appium_lib_core/driver.rbs +5 -5
  93. data/sig/lib/appium_lib_core/element.rbs +24 -0
  94. data/sig/lib/appium_lib_core/ios/clipboard.rbs +17 -0
  95. data/sig/lib/appium_lib_core/ios/device.rbs +12 -0
  96. data/sig/lib/appium_lib_core/ios/xcuitest/bridge.rbs +11 -0
  97. data/sig/lib/appium_lib_core/ios/xcuitest/device/performance.rbs +13 -0
  98. data/sig/lib/appium_lib_core/ios/xcuitest/device/screen.rbs +15 -0
  99. data/sig/lib/appium_lib_core/ios/xcuitest/device.rbs +14 -0
  100. data/sig/lib/appium_lib_core/mac2/bridge.rbs +9 -0
  101. data/sig/lib/appium_lib_core/mac2/device/screen.rbs +13 -0
  102. data/sig/lib/appium_lib_core/mac2/device.rbs +11 -0
  103. data/sig/lib/appium_lib_core/support/event_firing_bridge.rbs +21 -0
  104. data/sig/lib/appium_lib_core/windows/bridge.rbs +9 -0
  105. data/sig/lib/appium_lib_core/windows/device/screen.rbs +13 -0
  106. data/sig/lib/appium_lib_core/windows/device.rbs +11 -0
  107. metadata +105 -10
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a55943a46ddf58f1d5d55f35ca053dd462e5fa64f96acc2fcc25bd0f9e359abb
4
- data.tar.gz: 5fdec234ffc06d2d378ebfc328d6c8799e660f7ec0113ba67f24381da9aca682
3
+ metadata.gz: 701a3cbc303b81ada16130a28d1a4d2a42f96547b474cb612ef7d64e221fa1c9
4
+ data.tar.gz: 6af95a9abdb55ba70a678b007dae0d1f2a585140e80ffc19c90f7e271f88de19
5
5
  SHA512:
6
- metadata.gz: 16711bfc64ce4ef4c6501f45f03bcaf4aac07a41d7f24a99e0307309f6d1a9a81de9a1a871d1a74e1da69cdcfa863c5a40b863c05c127821e90c723757ac3d06
7
- data.tar.gz: 150380ab09f8287fc1863ea67c3144a858773704c8566c5ff5409e27246609f396c572a8ab28b120936ff7d040aea773ac5582f23f61d21b4aabc38812748fa8
6
+ metadata.gz: d0368fce9366a63d848c6ea3cea893a2df6a0a43a9d8b747affd0da66cd52a127a187df4f037ed628a055e010d7616f061a664df9a17f39971619ba13babf89b
7
+ data.tar.gz: b654930fcfb681003d8163c8ed7aed461b7633799e26c70bd9499fbbc336927ca9f87bf25254c1188960e88eade1370460557a83802a1799509de9c3e78144b5
data/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
  All notable changes to this project will be documented in this file.
3
3
  Read `release_notes.md` for commit level details.
4
4
 
5
+ ## [11.1.0] - 2025-08-08
6
+ - Add WebDriver BiDi support. Please set `webSocketUrl` in the capabilities to enable it.
7
+ - `test/functional/android/webdriver/bidi_test.rb` can be an example usage.
8
+ - Older versions of the Selenium Ruby bindings may raise exceptions due to missing dependencies.
9
+
10
+ ## [11.0.2] - 2025-04-27
11
+ - Add more sig definitions [#571](https://github.com/appium/ruby_lib_core/pull/571)
12
+
5
13
  ## [11.0.1] - 2025-03-27
6
14
  - Remove `::Selenium::WebDriver::DriverExtensions::HasWebStorage` import to follow selenium webdriver 4.30.0
7
15
 
data/Gemfile CHANGED
@@ -8,7 +8,7 @@ gem 'minitest', '~> 5.0'
8
8
  gem 'minitest-reporters', '~> 1.1'
9
9
  gem 'parallel_tests'
10
10
  gem 'rake', '~> 13.0'
11
- gem 'rubocop', '1.74.0'
11
+ gem 'rubocop', '1.79.2'
12
12
  gem 'simplecov'
13
13
  gem 'steep', '~> 1.9.3'
14
14
  gem 'webmock', '~> 3.25.0'
data/README.md CHANGED
@@ -114,8 +114,8 @@ $ IGNORE_VERSION_SKIP=true CI=true bundle exec rake test:func:android
114
114
  opts = {
115
115
  capabilities: { # Append capabilities
116
116
  platformName: 'ios',
117
- platformVersion: '11.0',
118
- deviceName: 'iPhone Simulator',
117
+ platformVersion: '18.4',
118
+ deviceName: 'iPhone 16 Plus',
119
119
  # app: '/path/to/MyiOS.app', # Without 'app' capability, an appium session starts with the home screen
120
120
  automationName: 'XCUITest'
121
121
  },
@@ -138,7 +138,7 @@ $ IGNORE_VERSION_SKIP=true CI=true bundle exec rake test:func:android
138
138
  $ ruby test.rb
139
139
  ```
140
140
 
141
- [Appium::Core.for](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Driver#for-class_method) documentation has more example to build a new driver instance.
141
+ [Appium::Core.for](https://rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Driver#for-class_method) documentation has more example to build a new driver instance.
142
142
 
143
143
  More examples are in [test/functional](test/functional)
144
144
 
@@ -153,9 +153,29 @@ attached_driver.page_source
153
153
 
154
154
  ### Capabilities
155
155
 
156
- Read [Appium/Core/Driver](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Driver) to catch up with available capabilities.
157
- Capabilities affect only ruby_lib is [Appium/Core/Options](https://www.rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Options).
156
+ Read [Appium/Core/Driver](https://rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Driver) to catch up with available capabilities.
157
+ Capabilities affect only ruby_lib is [Appium/Core/Options](https://rubydoc.info/github/appium/ruby_lib_core/Appium/Core/Options).
158
158
 
159
+ ### Improvement ideas
160
+
161
+ - for iOS
162
+
163
+ ```
164
+ $ appium driver run xcuitest download-wda-sim --outdir=/path/to/download/prebuilt/wda/
165
+ ```
166
+
167
+ Then, adding capabilities below:
168
+
169
+ ```json
170
+ {
171
+ "appium:usePreinstalledWDA": true,
172
+ "appium:prebuiltWDAPath": "/path/to/download/prebuilt/wda/WebDriverAgentRunner-Runner.app"
173
+ }
174
+ ```
175
+
176
+ It will improve initial new session request performance for iOS simulator.
177
+
178
+ `"appium:settings[respectSystemAlerts]" => true` for capability will also help to work with [permissions](https://appium.github.io/appium-xcuitest-driver/latest/guides/troubleshooting/#interact-with-dialogs-managed-by-comapplespringboard).
159
179
 
160
180
  ### Gives custom listener
161
181
 
@@ -171,7 +191,7 @@ capabilities: {
171
191
  deviceName: 'iPhone Simulator',
172
192
  automationName: 'XCUITest',
173
193
  app: '/path/to/MyiOS.app'
174
- },
194
+ }
175
195
  appium_lib: {
176
196
  listener: CustomListener.new
177
197
  }
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
21
21
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
22
  spec.require_paths = ['lib']
23
23
 
24
- spec.add_dependency 'faye-websocket', '~> 0.11.0'
24
+ spec.add_dependency 'faye-websocket', '>= 0.11', '< 0.13'
25
25
  spec.add_dependency 'selenium-webdriver', '~> 4.21'
26
26
 
27
27
  spec.metadata['rubygems_mfa_required'] = 'true'
@@ -0,0 +1,96 @@
1
+ # frozen_string_literal: true
2
+
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require_relative 'bridge'
16
+
17
+ module Appium
18
+ module Core
19
+ class Base
20
+ class BiDiBridge < ::Appium::Core::Base::Bridge
21
+ attr_reader :bidi
22
+
23
+ # Override
24
+ # Creates session handling.
25
+ #
26
+ # @param [::Appium::Core::Base::Capabilities, Hash] capabilities A capability
27
+ # @return [::Appium::Core::Base::Capabilities]
28
+ #
29
+ # @example
30
+ #
31
+ # opts = {
32
+ # caps: {
33
+ # platformName: :android,
34
+ # automationName: 'uiautomator2',
35
+ # platformVersion: '15',
36
+ # deviceName: 'Android',
37
+ # webSocketUrl: true,
38
+ # },
39
+ # appium_lib: {
40
+ # wait: 30
41
+ # }
42
+ # }
43
+ # core = ::Appium::Core.for(caps)
44
+ # driver = core.start_driver
45
+ #
46
+ def create_session(capabilities)
47
+ super
48
+
49
+ return @capabilities if @capabilities.nil?
50
+
51
+ begin
52
+ socket_url = @capabilities[:web_socket_url]
53
+ @bidi = ::Selenium::WebDriver::BiDi.new(url: socket_url) if socket_url
54
+ rescue StandardError => e
55
+ ::Appium::Logger.warn "WebSocket connection to #{socket_url} for BiDi failed. Error #{e}"
56
+ raise
57
+ end
58
+
59
+ @capabilities
60
+ end
61
+
62
+ def get(url)
63
+ browsing_context.navigate(url)
64
+ end
65
+
66
+ def go_back
67
+ browsing_context.traverse_history(-1)
68
+ end
69
+
70
+ def go_forward
71
+ browsing_context.traverse_history(1)
72
+ end
73
+
74
+ def refresh
75
+ browsing_context.reload
76
+ end
77
+
78
+ def quit
79
+ super
80
+ ensure
81
+ bidi.close
82
+ end
83
+
84
+ def close
85
+ execute(:close_window).tap { |handles| bidi.close if handles.empty? }
86
+ end
87
+
88
+ private
89
+
90
+ def browsing_context
91
+ @browsing_context ||= ::Selenium::WebDriver::BiDi::BrowsingContext.new(self)
92
+ end
93
+ end # class BiDiBridge
94
+ end # class Base
95
+ end # module Core
96
+ end # module Appium
@@ -54,7 +54,9 @@ module Appium
54
54
  @devtools = nil
55
55
  @bidi = nil
56
56
 
57
- # in the selenium webdriver as well
57
+ # internal use
58
+ @has_bidi = false
59
+
58
60
  ::Selenium::WebDriver::Remote::Bridge.element_class = ::Appium::Core::Element
59
61
  bridge ||= create_bridge(**opts)
60
62
  add_extensions(bridge.browser)
@@ -79,7 +81,9 @@ module Appium
79
81
 
80
82
  raise ::Appium::Core::Error::ArgumentError, "Unable to create a driver with parameters: #{opts}" unless opts.empty?
81
83
 
82
- bridge = ::Appium::Core::Base::Bridge.new(**bridge_opts)
84
+ @has_bidi = !!(capabilities && capabilities['webSocketUrl'])
85
+ bridge_clzz = @has_bidi ? ::Appium::Core::Base::BiDiBridge : ::Appium::Core::Base::Bridge
86
+ bridge = bridge_clzz.new(**bridge_opts)
83
87
 
84
88
  if session_id.nil?
85
89
  bridge.create_session(capabilities)
@@ -996,6 +1000,28 @@ module Appium
996
1000
  def convert_to_element(response_id)
997
1001
  @bridge.convert_to_element response_id
998
1002
  end
1003
+
1004
+ # Return bidi instance
1005
+ # @return [::Selenium::WebDriver::BiDi]
1006
+ #
1007
+ # @example
1008
+ #
1009
+ # log_entries = []
1010
+ # driver.bidi.send_cmd('session.subscribe', 'events': ['log.entryAdded'], 'contexts': ['NATIVE_APP'])
1011
+ # subscribe_id = driver.bidi.add_callback('log.entryAdded') do |params|
1012
+ # log_entries << params
1013
+ # end
1014
+ # driver.page_source
1015
+ #
1016
+ # driver.bidi.remove_callback('log.entryAdded', subscribe_id)
1017
+ # driver.bidi.send_cmd('session.unsubscribe', 'events': ['log.entryAdded'], 'contexts': ['NATIVE_APP'])
1018
+ #
1019
+ def bidi
1020
+ return @bridge.bidi if @has_bidi
1021
+
1022
+ msg = 'BiDi must be enabled by providing webSocketUrl capability to true'
1023
+ raise(::Selenium::WebDriver::Error::WebDriverError, msg)
1024
+ end
999
1025
  end # class Driver
1000
1026
  end # class Base
1001
1027
  end # module Core
@@ -30,8 +30,9 @@ require_relative 'device/execute_driver'
30
30
  require_relative 'device/orientation'
31
31
 
32
32
  # The following files have selenium-webdriver related stuff.
33
- require_relative 'base/driver'
34
33
  require_relative 'base/bridge'
34
+ require_relative 'base/bidi_bridge'
35
+ require_relative 'base/driver'
35
36
  require_relative 'base/capabilities'
36
37
  require_relative 'base/http_default'
37
38
  require_relative 'base/search_context'
@@ -29,7 +29,7 @@ module Appium
29
29
 
30
30
  def install_app(path, options = {})
31
31
  args = { appPath: path }
32
- args[:options] = options unless options.empty?
32
+ args[:options] = options unless options&.empty?
33
33
 
34
34
  execute :install_app, {}, args
35
35
  end
@@ -25,7 +25,7 @@ module Appium
25
25
  execute_script 'mobile:hideKeyboard', option
26
26
  end
27
27
 
28
- def is_keyboard_shown # rubocop:disable Naming/PredicateName
28
+ def is_keyboard_shown # rubocop:disable Naming/PredicatePrefix
29
29
  execute_script 'mobile:isKeyboardShown', {}
30
30
  end
31
31
  end # module Keyboard
@@ -421,8 +421,8 @@ module Appium
421
421
  d_c = DirectConnections.new(@driver.capabilities)
422
422
  @driver.update_sending_request_to(protocol: d_c.protocol, host: d_c.host, port: d_c.port, path: d_c.path)
423
423
  end
424
- rescue Errno::ECONNREFUSED
425
- raise "ERROR: Unable to connect to Appium. Is the server running on #{@custom_url}?"
424
+ rescue Errno::ECONNREFUSED => e
425
+ raise "ERROR: Unable to connect to Appium. Is the server running on #{@custom_url}? Error: #{e}"
426
426
  end
427
427
 
428
428
  if @http_client.instance_variable_defined? :@additional_headers
@@ -14,7 +14,7 @@
14
14
 
15
15
  module Appium
16
16
  module Core
17
- VERSION = '11.0.1' unless defined? ::Appium::Core::VERSION
18
- DATE = '2025-03-27' unless defined? ::Appium::Core::DATE
17
+ VERSION = '11.1.0' unless defined? ::Appium::Core::VERSION
18
+ DATE = '2025-08-08' unless defined? ::Appium::Core::DATE
19
19
  end
20
20
  end
data/sig/gems/em.rbs ADDED
@@ -0,0 +1,5 @@
1
+ module EM
2
+ def stop: () -> untyped
3
+
4
+ def run: () -> untyped
5
+ end
data/sig/gems/faye.rbs ADDED
@@ -0,0 +1,10 @@
1
+ module Faye
2
+ module WebSocket
3
+ class Client
4
+ def initialize: (String, String, Hash[Symbol, untyped]) -> void
5
+ def close: () -> void
6
+ def send: (String) -> void
7
+ def on: (String, Proc) -> void
8
+ end
9
+ end
10
+ end
@@ -0,0 +1,16 @@
1
+ module Selenium
2
+ module WebDriver
3
+ module Atoms
4
+ include _Bridge
5
+ include _ExecuteScript
6
+
7
+ def atom_script: (Symbol) -> String
8
+
9
+ private
10
+
11
+ def read_atom: (Symbol function) -> String
12
+
13
+ def execute_atom: (Symbol function_name, [Element | String | Symbol] arguments) -> [Element | Integer | Float | bool | nil | String | Array[untyped]]
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,27 @@
1
+ module Selenium
2
+ module WebDriver
3
+ class BiDi
4
+ class BrowsingContext
5
+ @bidi: untyped
6
+
7
+ @id: untyped
8
+
9
+ attr_accessor id: untyped
10
+
11
+ READINESS_STATE: Hash[Symbol, String]
12
+
13
+ def initialize: (driver: untyped, ?browsing_context_id: untyped?, ?type: untyped?, ?reference_context: untyped?) -> void
14
+
15
+ def navigate: (url: untyped, ?readiness_state: untyped?) -> untyped
16
+
17
+ def get_tree: (?max_depth: untyped?) -> untyped
18
+
19
+ def close: () -> untyped
20
+
21
+ private
22
+
23
+ def create: (untyped type, untyped reference_context) -> untyped
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,25 @@
1
+ module Selenium
2
+ module WebDriver
3
+ class BiDi
4
+ class BrowsingContextInfo
5
+ @id: untyped
6
+
7
+ @url: untyped
8
+
9
+ @children: untyped
10
+
11
+ @parent_browsing_context: untyped
12
+
13
+ attr_accessor id: untyped
14
+
15
+ attr_accessor url: untyped
16
+
17
+ attr_accessor children: untyped
18
+
19
+ attr_accessor parent_browsing_context: untyped
20
+
21
+ def initialize: (id: untyped, url: untyped, children: untyped, parent_context: untyped) -> void
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,33 @@
1
+ module Selenium
2
+ module WebDriver
3
+ class BiDi
4
+ class LogInspector
5
+ @bidi: untyped
6
+
7
+ EVENTS: Hash[Symbol, String]
8
+
9
+ LOG_LEVEL: Hash[Symbol, String]
10
+
11
+ def initialize: (untyped driver, ?untyped? browsing_context_ids) -> void
12
+
13
+ def on_console_entry: (?untyped? filter_by) { () -> untyped } -> untyped
14
+
15
+ def on_javascript_log: (?untyped? filter_by) { () -> untyped } -> untyped
16
+
17
+ def on_javascript_exception: () { () -> untyped } -> untyped
18
+
19
+ def on_log: (?untyped? filter_by) { (untyped) -> untyped } -> untyped?
20
+
21
+ private
22
+
23
+ def on: (untyped event) { () -> untyped } -> untyped
24
+
25
+ def check_valid_filter: (untyped filter_by) -> (nil | untyped)
26
+
27
+ def console_log_events: (untyped params, untyped filter_by) { (untyped) -> untyped } -> untyped?
28
+
29
+ def javascript_log_events: (untyped params, untyped filter_by) { (untyped) -> untyped } -> untyped?
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,17 @@
1
+ module Selenium
2
+ module WebDriver
3
+ class BiDi
4
+ class NavigateResult
5
+ @url: untyped
6
+
7
+ @navigation_id: untyped
8
+
9
+ attr_accessor url: untyped
10
+
11
+ attr_accessor navigation_id: untyped
12
+
13
+ def initialize: (url: untyped, navigation_id: untyped) -> void
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,19 @@
1
+ module Selenium
2
+ module WebDriver
3
+ class BiDi
4
+ class Session
5
+ @bidi: untyped
6
+
7
+ Status: untyped
8
+
9
+ def initialize: (untyped bidi) -> void
10
+
11
+ def status: () -> untyped
12
+
13
+ def subscribe: (untyped events, ?untyped? browsing_contexts) -> untyped
14
+
15
+ def unsubscribe: (untyped events, ?untyped? browsing_contexts) -> untyped
16
+ end
17
+ end
18
+ end
19
+ end