diff --git a/rb/sig/lib/selenium/server.rbs b/rb/sig/lib/selenium/server.rbs index 4ae361debc94b..10020d85851f0 100644 --- a/rb/sig/lib/selenium/server.rbs +++ b/rb/sig/lib/selenium/server.rbs @@ -4,36 +4,36 @@ module Selenium self.@available_assets: untyped - @jar: untyped + @jar: String - @host: untyped + @host: String - @role: untyped + @role: String - @port: untyped + @port: Integer - @timeout: untyped + @timeout: Integer - @background: untyped + @background: bool - @additional_args: untyped + @additional_args: Integer | bool | Array[untyped] - @log: untyped + @log: String | bool @log_file: untyped @process: untyped - @socket: untyped + @socket: WebDriver::SocketPoller class Error < StandardError end CL_RESET: untyped - def self.get: (?Symbol required_version, ?Hash[untyped, untyped] opts) -> untyped + def self.get: (Symbol | String required_version, ?Hash[untyped, untyped] opts) -> Server - def self.download: (?Symbol required_version) -> untyped + def self.download: (Symbol | String required_version) -> String def self.latest: () -> untyped @@ -55,7 +55,7 @@ module Selenium attr_accessor log: untyped - def initialize: (untyped jar, ?Hash[untyped, untyped] opts) -> void + def initialize: (String jar, ?Hash[String | Symbol, Integer | bool] opts) -> void def start: () -> untyped diff --git a/rb/sig/lib/selenium/webdriver/atoms.rbs b/rb/sig/lib/selenium/webdriver/atoms.rbs index eacbd40132411..e825969f918c5 100644 --- a/rb/sig/lib/selenium/webdriver/atoms.rbs +++ b/rb/sig/lib/selenium/webdriver/atoms.rbs @@ -4,13 +4,13 @@ module Selenium include _Bridge include _ExecuteScript - def atom_script: (untyped) -> untyped + def atom_script: (Symbol) -> String private def read_atom: (Symbol function) -> String - def execute_atom: (Symbol function_name, *untyped arguments) -> untyped + def execute_atom: (Symbol function_name, [Element | String | Symbol] arguments) -> [Element | Integer | Float | bool | nil | String | Array[untyped]] end end end diff --git a/rb/sig/lib/selenium/webdriver/bidi.rbs b/rb/sig/lib/selenium/webdriver/bidi.rbs index e37040f4d9061..109b658bca24b 100644 --- a/rb/sig/lib/selenium/webdriver/bidi.rbs +++ b/rb/sig/lib/selenium/webdriver/bidi.rbs @@ -1,21 +1,21 @@ module Selenium module WebDriver class BiDi - @ws: untyped + @ws: WebSocketConnection - @session: untyped + @session: Session - def initialize: (url: untyped) -> void + def initialize: (url: String) -> void - def close: () -> untyped + def close: () -> nil - def callbacks: () -> untyped + def callbacks: () -> Hash[untyped, untyped] - def session: () -> untyped + def session: () -> Session def send_cmd: (untyped method, **untyped params) -> untyped - def error_message: (untyped message) -> ::String + def error_message: (Hash[String,String] message) -> String end end end diff --git a/rb/sig/lib/selenium/webdriver/chrome/features.rbs b/rb/sig/lib/selenium/webdriver/chrome/features.rbs index a4523edc32d4b..ab3e9c85707e4 100644 --- a/rb/sig/lib/selenium/webdriver/chrome/features.rbs +++ b/rb/sig/lib/selenium/webdriver/chrome/features.rbs @@ -4,10 +4,10 @@ module Selenium module Features include WebDriver::Chromium::Features - CHROME_COMMANDS: untyped - COMMANDS: Array[Symbol | String] + CHROME_COMMANDS: Hash[Symbol, Array[Symbol | String]] + COMMANDS: Hash[Symbol, Array[Symbol | String]] - def command_list: -> untyped + def command_list: -> Hash[Symbol, Array[Symbol | String]] def commands: (Symbol command) -> Array[Symbol | String] end diff --git a/rb/sig/lib/selenium/webdriver/common/options.rbs b/rb/sig/lib/selenium/webdriver/common/options.rbs index ccb419b4f7902..adf1b2bb473c7 100644 --- a/rb/sig/lib/selenium/webdriver/common/options.rbs +++ b/rb/sig/lib/selenium/webdriver/common/options.rbs @@ -1,43 +1,43 @@ module Selenium module WebDriver class Options - @options: untyped + @options: Hash[String | Symbol, String | Numeric | bool?] W3C_OPTIONS: Array[Symbol] GRID_OPTIONS: Array[Symbol] - BROWSER: untyped + BROWSER: Symbol KEY: untyped - CAPABILITIES: Hash[Symbol, String] + CAPABILITIES: Hash[String | Symbol, String | Numeric | bool?] - attr_reader self.driver_path: untyped + attr_reader self.driver_path: String - def self.chrome: (**untyped opts) -> untyped + def self.chrome: (**String | Symbol | Integer | bool opts) -> Chrome::Options - def self.firefox: (**untyped opts) -> untyped + def self.firefox: (**String | Symbol | Integer | bool opts) -> Firefox::Options - def self.ie: (**untyped opts) -> untyped + def self.ie: (**String | Symbol | Integer | bool opts) -> IE::Options alias self.internet_explorer self.ie - def self.edge: (**untyped opts) -> untyped + def self.edge: (**String | Symbol | Integer | bool opts) -> Edge::Options alias self.microsoftedge self.edge - def self.safari: (**untyped opts) -> untyped + def self.safari: (**String | Symbol | Integer | bool opts) -> Safari::Options def self.set_capabilities: () -> untyped - attr_accessor options: untyped + attr_accessor options: Hash[String | Symbol, String | Numeric | bool?] - def initialize: (**untyped opts) -> void + def initialize: (Hash[String | Symbol, String | Numeric | bool] opts) -> void - def add_option: (untyped name, ?untyped? value) -> untyped + def add_option: (String | Symbol name, String | Numeric | bool? value) -> (String | Numeric | bool)? - def ==: (untyped other) -> (false | untyped) + def ==: (untyped other) -> bool alias eql? == @@ -53,13 +53,14 @@ module Selenium def camelize?: (untyped _key) -> true - def generate_as_json: (untyped value, ?camelize_keys: bool) -> untyped + def generate_as_json: (Array[untyped] | Hash[untyped, untyped] | String | Symbol value, ?camelize_keys: bool) + -> (Array[untyped] | Hash[untyped, untyped] | String | Symbol) - def process_json_hash: (untyped value, untyped camelize_keys) -> untyped + def process_json_hash: (Hash[untyped, untyped] value, bool camelize_keys) -> Hash[untyped, untyped] - def convert_json_key: (untyped key, ?camelize: bool) -> untyped + def convert_json_key: (String | Symbol key, camelize: bool) -> String - def camel_case: (untyped str) -> untyped + def camel_case: (String str) -> String end end end diff --git a/rb/sig/lib/selenium/webdriver/common/target_locator.rbs b/rb/sig/lib/selenium/webdriver/common/target_locator.rbs index 609989c2ca3d8..2e650495a40ff 100644 --- a/rb/sig/lib/selenium/webdriver/common/target_locator.rbs +++ b/rb/sig/lib/selenium/webdriver/common/target_locator.rbs @@ -7,9 +7,9 @@ module Selenium def parent_frame: () -> void - def new_window: (?::Symbol `type`) { (untyped) -> untyped } -> untyped + def new_window: (Symbol type) { (untyped) -> untyped } -> untyped - def window: (untyped id) ?{ () -> untyped } -> untyped + def window: (Integer id) ?{ () -> untyped } -> untyped def active_element: () -> Element diff --git a/rb/sig/lib/selenium/webdriver/devtools.rbs b/rb/sig/lib/selenium/webdriver/devtools.rbs index 44db3c460745f..892e89bc4c8dd 100644 --- a/rb/sig/lib/selenium/webdriver/devtools.rbs +++ b/rb/sig/lib/selenium/webdriver/devtools.rbs @@ -10,7 +10,7 @@ module Selenium def initialize: (url: untyped) -> void - def close: () -> untyped + def close: () -> nil def callbacks: () -> untyped @@ -24,7 +24,7 @@ module Selenium def start_session: () -> untyped - def error_message: (untyped error) -> untyped + def error_message: (Hash[untyped, untyped] error) -> String end end end diff --git a/rb/sig/lib/selenium/webdriver/edge.rbs b/rb/sig/lib/selenium/webdriver/edge.rbs index fea64d68b81e6..e357f141b0061 100644 --- a/rb/sig/lib/selenium/webdriver/edge.rbs +++ b/rb/sig/lib/selenium/webdriver/edge.rbs @@ -1,11 +1,11 @@ module Selenium module WebDriver module Edge - self.@path: untyped + @path: String? - def self.path=: (untyped path) -> untyped + def self.path=: (String path) -> String - def self.path: () -> untyped + def self.path: () -> String? end end end diff --git a/rb/sig/lib/selenium/webdriver/firefox.rbs b/rb/sig/lib/selenium/webdriver/firefox.rbs index 9d25371c0f786..790ac05f42dbd 100644 --- a/rb/sig/lib/selenium/webdriver/firefox.rbs +++ b/rb/sig/lib/selenium/webdriver/firefox.rbs @@ -1,7 +1,7 @@ module Selenium module WebDriver module Firefox - self.@path: untyped + @path: String? DEFAULT_PORT: Integer @@ -13,9 +13,9 @@ module Selenium DEVTOOLS_VERSION: Integer - def self.path=: (untyped path) -> untyped + def self.path=: (String path) -> String - def self.path: () -> untyped + def self.path: () -> String? end end end diff --git a/rb/sig/lib/selenium/webdriver/safari.rbs b/rb/sig/lib/selenium/webdriver/safari.rbs index 80bfbd7a4b4a1..7159df25cc89f 100644 --- a/rb/sig/lib/selenium/webdriver/safari.rbs +++ b/rb/sig/lib/selenium/webdriver/safari.rbs @@ -1,21 +1,20 @@ module Selenium module WebDriver module Safari - self.@use_technology_preview: untyped + @use_technology_preview: bool? + @path: String? - self.@path: untyped - - attr_accessor self.use_technology_preview: untyped + attr_accessor self.use_technology_preview: bool def self.technology_preview: () -> String - def self.technology_preview!: () -> untyped + def self.technology_preview!: () -> bool - def self.technology_preview?: () -> untyped + def self.technology_preview?: () -> bool - def self.path=: (untyped path) -> untyped + def self.path=: (String) -> String - def self.path: () -> untyped + def self.path: () -> String end end end diff --git a/rb/sig/lib/selenium/webdriver/support.rbs b/rb/sig/lib/selenium/webdriver/support.rbs deleted file mode 100644 index e69de29bb2d1d..0000000000000 diff --git a/rb/sig/lib/selenium_webdriver.rbs b/rb/sig/lib/selenium_webdriver.rbs deleted file mode 100644 index e69de29bb2d1d..0000000000000