Skip to content

Commit 798f3f9

Browse files
authored
[rb] Add missing RBS methods (SeleniumHQ#14621)
1 parent c5fbdd6 commit 798f3f9

File tree

11 files changed

+57
-15
lines changed

11 files changed

+57
-15
lines changed

rb/sig/lib/selenium/webdriver/bidi.rbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ module Selenium
1313

1414
def callbacks: () -> Hash[untyped, untyped]
1515

16-
def remove_callback: -> Array[Integer]
16+
def remove_callback: (String event, Integer id) -> Error::WebDriverError?
1717

1818
def session: () -> Session
1919

rb/sig/lib/selenium/webdriver/bidi/log_handler.rbs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ module Selenium
1414

1515
def add_message_handler: (String type) { (untyped) -> untyped } -> Integer
1616

17-
def remove_message_handler: (Integer id) -> false
17+
def remove_message_handler: (Integer id) -> bool
1818

1919
private
2020

21-
def subscribe_log_entry: () -> false
21+
def subscribe_log_entry: () -> bool
2222

23-
def unsubscribe_log_entry: () -> false
23+
def unsubscribe_log_entry: () -> bool
2424
end
2525
end
2626
end
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,24 @@
11
module Selenium
22
module WebDriver
33
class DriverFinder
4+
@options: untyped
5+
6+
@paths: untyped
7+
@service: untyped
8+
9+
def initialize: (untyped options,untyped service) -> void
10+
411
def self.path: (untyped options, untyped klass) -> untyped
12+
13+
def browser_path: -> untyped
14+
15+
def browser_path?: -> untyped
16+
17+
def driver_path: -> untyped
18+
19+
private
20+
21+
def paths: -> untyped
522
end
623
end
724
end

rb/sig/lib/selenium/webdriver/common/search_context.rbs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ module Selenium
55

66
FINDERS: untyped
77

8+
attr_accessor self.extra_finders: untyped
9+
10+
def self.finders: -> untyped
11+
812
def find_element: (*untyped args) -> untyped
913

1014
def find_elements: (*untyped args) -> untyped

rb/sig/lib/selenium/webdriver/common/service.rbs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,14 @@ module Selenium
4747

4848
attr_accessor args: untyped
4949

50-
def env_path: -> String
50+
def env_path: -> String?
5151

5252
alias extra_args args
5353

5454
def initialize: (?path: untyped?, ?port: untyped?, ?log: untyped?, ?args: untyped?) -> void
5555

56+
def find_driver_path: -> untyped
57+
5658
def launch: () -> untyped
5759

5860
def shutdown_supported: () -> untyped

rb/sig/lib/selenium/webdriver/common/websocket_connection.rbs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,14 @@ module Selenium
3535

3636
def initialize: (url: untyped) -> void
3737

38+
def add_callback: (untyped event, untyped id) -> untyped
39+
3840
def close: () -> untyped
3941

4042
def callbacks: () -> untyped
4143

44+
def remove_callback: (untyped event, untyped id) -> untyped
45+
4246
def send_cmd: (**untyped payload) -> untyped
4347

4448
private

rb/sig/lib/selenium/webdriver/fedcm/dialog.rbs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ module Selenium
77

88
@bridge: Remote::Bridge
99

10+
def initialize: (Remote::Bridge bridge) -> void
11+
1012
def accounts: -> Array[Account]
1113

1214
def cancel: -> Remote::Response?

rb/sig/lib/selenium/webdriver/firefox/options.rbs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ module Selenium
66

77
@profile: untyped
88

9+
@options: Hash[Symbol, untyped]
10+
911
attr_accessor debugger_address: untyped
1012

1113
KEY: String

rb/sig/lib/selenium/webdriver/remote/http/common.rbs

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,31 @@ module Selenium
99

1010
DEFAULT_HEADERS: Hash[String, untyped]
1111

12-
attr_writer server_url: untyped
12+
@common_headers: Hash[String, untyped]
13+
14+
attr_accessor self.extra_headers: Hash[String, untyped]
15+
16+
attr_writer self.user_agent: String
17+
18+
def self.user_agent: -> String
19+
20+
attr_writer server_url: String
1321

1422
def quit_errors: () -> Array[untyped]
1523

16-
def close: () -> untyped
24+
def close: () -> nil
1725

1826
def call: (untyped verb, untyped url, untyped command_hash) -> untyped
1927

2028
private
2129

22-
def server_url: () -> untyped
30+
def common_headers: -> Hash[String, untyped]
31+
32+
def server_url: () -> String
2333

2434
def request: (*untyped) -> untyped
2535

26-
def create_response: (untyped code, untyped body, untyped content_type) -> untyped
36+
def create_response: (Integer code, Hash[String, untyped] body, String content_type) -> Remote::Response
2737
end
2838
end
2939
end

rb/sig/lib/selenium/webdriver/support/guards/guard.rbs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ module Selenium
1515

1616
attr_reader guarded: untyped
1717

18+
attr_reader tracker: String
1819
attr_reader type: untyped
1920

2021
attr_reader messages: untyped

0 commit comments

Comments
 (0)