-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[rb] Add RBS type support for BiDi related classes (#14611)
- Loading branch information
Showing
6 changed files
with
81 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
module Selenium | ||
module WebDriver | ||
class BiDi | ||
class LogHandler | ||
@bidi: BiDi | ||
|
||
@log_entry_subscribed: bool | ||
|
||
ConsoleLogEntry: Struct | ||
|
||
JavaScriptLogEntry: Struct | ||
|
||
def initialize: (BiDi bidi) -> void | ||
|
||
def add_message_handler: (String type) { (untyped) -> untyped } -> Integer | ||
|
||
def remove_message_handler: (Integer id) -> false | ||
|
||
private | ||
|
||
def subscribe_log_entry: () -> false | ||
|
||
def unsubscribe_log_entry: () -> false | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module Selenium | ||
module WebDriver | ||
class BiDi | ||
class Struct < ::Struct | ||
def self.new: (*untyped args) { (?) -> untyped } -> void | ||
|
||
def self.camel_to_snake: (String camel_str) -> String | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module Selenium | ||
module WebDriver | ||
module Remote | ||
class BiDiBridge < Bridge | ||
@bidi: untyped | ||
|
||
attr_reader bidi: untyped | ||
|
||
def create_session: (Hash[Symbol, String] capabilities) -> BiDi | ||
|
||
def quit: () -> nil | ||
|
||
def close: () -> nil | ||
end | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
rb/sig/lib/selenium/webdriver/remote/bridge/locator_converter.rbs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module Selenium | ||
module WebDriver | ||
module Remote | ||
class Bridge | ||
class LocatorConverter | ||
ESCAPE_CSS_REGEXP: Regexp | ||
|
||
UNICODE_CODE_POINT: Integer | ||
|
||
def convert: (String | Symbol how, String what) -> Array[String] | ||
|
||
private | ||
|
||
def escape_css: (String string) -> String | ||
end | ||
end | ||
end | ||
end | ||
end |