diff --git a/rb/sig/lib/selenium/webdriver/bidi.rbs b/rb/sig/lib/selenium/webdriver/bidi.rbs index fa6b8757f6815..9f8395be94270 100644 --- a/rb/sig/lib/selenium/webdriver/bidi.rbs +++ b/rb/sig/lib/selenium/webdriver/bidi.rbs @@ -13,7 +13,7 @@ module Selenium def callbacks: () -> Hash[untyped, untyped] - def remove_callback: -> Array[Integer] + def remove_callback: (String event, Integer id) -> Error::WebDriverError? def session: () -> Session diff --git a/rb/sig/lib/selenium/webdriver/bidi/log_handler.rbs b/rb/sig/lib/selenium/webdriver/bidi/log_handler.rbs index 703729d9c74ec..47f94107b14ec 100644 --- a/rb/sig/lib/selenium/webdriver/bidi/log_handler.rbs +++ b/rb/sig/lib/selenium/webdriver/bidi/log_handler.rbs @@ -14,13 +14,13 @@ module Selenium def add_message_handler: (String type) { (untyped) -> untyped } -> Integer - def remove_message_handler: (Integer id) -> false + def remove_message_handler: (Integer id) -> bool private - def subscribe_log_entry: () -> false + def subscribe_log_entry: () -> bool - def unsubscribe_log_entry: () -> false + def unsubscribe_log_entry: () -> bool end end end diff --git a/rb/sig/lib/selenium/webdriver/common/driver_finder.rbs b/rb/sig/lib/selenium/webdriver/common/driver_finder.rbs index d012a5ec38f3c..4373fec706895 100644 --- a/rb/sig/lib/selenium/webdriver/common/driver_finder.rbs +++ b/rb/sig/lib/selenium/webdriver/common/driver_finder.rbs @@ -1,7 +1,24 @@ module Selenium module WebDriver class DriverFinder + @options: untyped + + @paths: untyped + @service: untyped + + def initialize: (untyped options,untyped service) -> void + def self.path: (untyped options, untyped klass) -> untyped + + def browser_path: -> untyped + + def browser_path?: -> untyped + + def driver_path: -> untyped + + private + + def paths: -> untyped end end end diff --git a/rb/sig/lib/selenium/webdriver/common/search_context.rbs b/rb/sig/lib/selenium/webdriver/common/search_context.rbs index 5f8f227156cb6..c240e68d5ce5b 100644 --- a/rb/sig/lib/selenium/webdriver/common/search_context.rbs +++ b/rb/sig/lib/selenium/webdriver/common/search_context.rbs @@ -5,6 +5,10 @@ module Selenium FINDERS: untyped + attr_accessor self.extra_finders: untyped + + def self.finders: -> untyped + def find_element: (*untyped args) -> untyped def find_elements: (*untyped args) -> untyped diff --git a/rb/sig/lib/selenium/webdriver/common/service.rbs b/rb/sig/lib/selenium/webdriver/common/service.rbs index e07af9ac3e1ce..788728741d3e1 100644 --- a/rb/sig/lib/selenium/webdriver/common/service.rbs +++ b/rb/sig/lib/selenium/webdriver/common/service.rbs @@ -47,12 +47,14 @@ module Selenium attr_accessor args: untyped - def env_path: -> String + def env_path: -> String? alias extra_args args def initialize: (?path: untyped?, ?port: untyped?, ?log: untyped?, ?args: untyped?) -> void + def find_driver_path: -> untyped + def launch: () -> untyped def shutdown_supported: () -> untyped diff --git a/rb/sig/lib/selenium/webdriver/common/websocket_connection.rbs b/rb/sig/lib/selenium/webdriver/common/websocket_connection.rbs index 411f09d91e948..b0276a246d815 100644 --- a/rb/sig/lib/selenium/webdriver/common/websocket_connection.rbs +++ b/rb/sig/lib/selenium/webdriver/common/websocket_connection.rbs @@ -35,10 +35,14 @@ module Selenium def initialize: (url: untyped) -> void + def add_callback: (untyped event, untyped id) -> untyped + def close: () -> untyped def callbacks: () -> untyped + def remove_callback: (untyped event, untyped id) -> untyped + def send_cmd: (**untyped payload) -> untyped private diff --git a/rb/sig/lib/selenium/webdriver/fedcm/dialog.rbs b/rb/sig/lib/selenium/webdriver/fedcm/dialog.rbs index c16ef91d6c930..98e4ff81a283e 100644 --- a/rb/sig/lib/selenium/webdriver/fedcm/dialog.rbs +++ b/rb/sig/lib/selenium/webdriver/fedcm/dialog.rbs @@ -7,6 +7,8 @@ module Selenium @bridge: Remote::Bridge + def initialize: (Remote::Bridge bridge) -> void + def accounts: -> Array[Account] def cancel: -> Remote::Response? diff --git a/rb/sig/lib/selenium/webdriver/firefox/options.rbs b/rb/sig/lib/selenium/webdriver/firefox/options.rbs index d4087e414024c..2fcb015d6430e 100644 --- a/rb/sig/lib/selenium/webdriver/firefox/options.rbs +++ b/rb/sig/lib/selenium/webdriver/firefox/options.rbs @@ -6,6 +6,8 @@ module Selenium @profile: untyped + @options: Hash[Symbol, untyped] + attr_accessor debugger_address: untyped KEY: String diff --git a/rb/sig/lib/selenium/webdriver/remote/http/common.rbs b/rb/sig/lib/selenium/webdriver/remote/http/common.rbs index 3e1e2ecc26be3..dfafbbf8456bf 100644 --- a/rb/sig/lib/selenium/webdriver/remote/http/common.rbs +++ b/rb/sig/lib/selenium/webdriver/remote/http/common.rbs @@ -9,21 +9,31 @@ module Selenium DEFAULT_HEADERS: Hash[String, untyped] - attr_writer server_url: untyped + @common_headers: Hash[String, untyped] + + attr_accessor self.extra_headers: Hash[String, untyped] + + attr_writer self.user_agent: String + + def self.user_agent: -> String + + attr_writer server_url: String def quit_errors: () -> Array[untyped] - def close: () -> untyped + def close: () -> nil def call: (untyped verb, untyped url, untyped command_hash) -> untyped private - def server_url: () -> untyped + def common_headers: -> Hash[String, untyped] + + def server_url: () -> String def request: (*untyped) -> untyped - def create_response: (untyped code, untyped body, untyped content_type) -> untyped + def create_response: (Integer code, Hash[String, untyped] body, String content_type) -> Remote::Response end end end diff --git a/rb/sig/lib/selenium/webdriver/support/guards/guard.rbs b/rb/sig/lib/selenium/webdriver/support/guards/guard.rbs index d5e312b9ee43f..70c13b3cb0312 100644 --- a/rb/sig/lib/selenium/webdriver/support/guards/guard.rbs +++ b/rb/sig/lib/selenium/webdriver/support/guards/guard.rbs @@ -15,6 +15,7 @@ module Selenium attr_reader guarded: untyped + attr_reader tracker: String attr_reader type: untyped attr_reader messages: untyped diff --git a/rb/sig/selenium/web_driver/script.rbs b/rb/sig/selenium/web_driver/script.rbs index f2dc066174df0..73804ed7d280a 100644 --- a/rb/sig/selenium/web_driver/script.rbs +++ b/rb/sig/selenium/web_driver/script.rbs @@ -4,17 +4,17 @@ module Selenium @bidi: BiDi @log_entry_subscribed: bool - def add_console_message_handler: -> untyped + @log_handler: BiDi::LogHandler - def add_javascript_error_handler: -> untyped + def initialize: (BiDi bidi) -> void - def remove_console_message_handler: -> untyped + def add_console_message_handler: -> Integer - alias remove_javascript_error_handler remove_console_message_handler + def add_javascript_error_handler: -> Integer - private + def remove_console_message_handler: (Integer id) -> bool - def subscribe_log_entry: -> untyped + alias remove_javascript_error_handler remove_console_message_handler end end end