Skip to content

[rb] Use rbs trace #15686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 32 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
8c317d8
[build] allow tests tagged exclusive-if-local to run on rbe
titusfortner Mar 22, 2025
bb29c66
merge trunk
aguspe Apr 2, 2025
5b6a0ce
Merge branch 'trunk' of github.com:aguspe/selenium into trunk
aguspe Apr 22, 2025
c9cb77c
Merge branch 'trunk' of github.com:aguspe/selenium into trunk
aguspe Apr 30, 2025
db643da
Implement RBS trace
aguspe Apr 30, 2025
289760c
Add RBS comments
aguspe May 2, 2025
5fe85cd
change platforms for rbs trace
aguspe May 2, 2025
3517eb6
Merge branch 'trunk' into use_rbs_trace
aguspe May 2, 2025
481434f
Fix trace load issue
aguspe May 5, 2025
3dd7632
Merge remote-tracking branch 'origin/use_rbs_trace' into use_rbs_trace
aguspe May 5, 2025
9d6dfd9
Merge branch 'trunk' into use_rbs_trace
aguspe May 5, 2025
68c1e73
remove trace from CI
aguspe May 5, 2025
c492ae7
Merge branch 'trunk' into use_rbs_trace
aguspe May 7, 2025
52bec69
Merge branch 'trunk' into use_rbs_trace
aguspe May 7, 2025
1ba4b0f
Merge branch 'trunk' into use_rbs_trace
aguspe May 11, 2025
cec3855
Try to use ci? method
aguspe May 12, 2025
7703edc
Merge remote-tracking branch 'origin/use_rbs_trace' into use_rbs_trace
aguspe May 12, 2025
5c7450b
Quit the driver after the trace setup
aguspe May 12, 2025
4f36c14
Merge branch 'trunk' into use_rbs_trace
aguspe May 12, 2025
257e6ed
Merge update
aguspe May 13, 2025
5deb1b6
Update comments
aguspe May 14, 2025
fdab631
Merge remote-tracking branch 'origin/use_rbs_trace' into use_rbs_trace
aguspe May 14, 2025
c531eb3
Merge branch 'trunk' into use_rbs_trace
aguspe May 14, 2025
1cc3512
Remove CI method
aguspe May 14, 2025
f878c80
Merge remote-tracking branch 'origin/use_rbs_trace' into use_rbs_trace
aguspe May 14, 2025
ec9781c
Merge branch 'trunk' into use_rbs_trace
aguspe May 16, 2025
8cadb71
Skip firefox test
aguspe May 17, 2025
4d12946
Merge remote-tracking branch 'origin/use_rbs_trace' into use_rbs_trace
aguspe May 17, 2025
97f1e59
Remove RBS comments
aguspe May 18, 2025
4012263
Fix linter issues
aguspe May 18, 2025
c6ac031
Fix formatting
aguspe May 18, 2025
152c5a2
Fix formatting
aguspe May 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions rb/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ gem 'activesupport', '~> 7.0', require: false, platforms: %i[mri mingw x64_mingw
gem 'curb', '~> 1.0.5', require: false, platforms: %i[mri mingw x64_mingw]
gem 'debug', '~> 1.7', require: false, platforms: %i[mri mingw x64_mingw]
gem 'steep', '~> 1.5.0', require: false, platforms: %i[mri mingw x64_mingw]

gem 'rbs-trace', '~> 0.5.1', require: false, platforms: %i[mri mingw x64_mingw]
4 changes: 4 additions & 0 deletions rb/Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ GEM
ffi (~> 1.0)
rbs (3.9.2)
logger
rbs-trace (0.5.1)
prism (>= 0.3.0)
rbs (>= 3.5.0)
rchardet (1.9.0)
rdoc (6.13.1)
psych (>= 4.0.0)
Expand Down Expand Up @@ -198,6 +201,7 @@ DEPENDENCIES
git (~> 1.19)
rack (~> 2.0)
rake (~> 13.0)
rbs-trace (~> 0.5.1)
rspec (~> 3.0)
rubocop (~> 1.75)
rubocop-performance (~> 1.25)
Expand Down
4 changes: 1 addition & 3 deletions rb/lib/selenium/webdriver/firefox/profile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,7 @@ def write_prefs(prefs, path)
end
end
end
end

# Profile
end # Profile
end # Firefox
end # WebDriver
end # Selenium
52 changes: 52 additions & 0 deletions rb/rbs_collection.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,22 @@ gems:
version: '0'
source:
type: stdlib
- name: diff-lcs
version: '1.5'
source:
type: git
name: ruby/gem_rbs_collection
revision: eb6867fdb70e82e3aac6b51623ed1b6760c3c072
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: digest
version: '0'
source:
type: stdlib
- name: erb
version: '0'
source:
type: stdlib
- name: fileutils
version: '0'
source:
Expand All @@ -49,6 +65,10 @@ gems:
version: '0'
source:
type: stdlib
- name: openssl
version: '0'
source:
type: stdlib
- name: optparse
version: '0'
source:
Expand All @@ -69,6 +89,10 @@ gems:
revision: 01361bb0fd6e2f3e2da2b11a733ffc938b9047c4
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: prism
version: 1.4.0
source:
type: rubygems
- name: rack
version: '2.2'
source:
Expand All @@ -93,6 +117,10 @@ gems:
revision: 01361bb0fd6e2f3e2da2b11a733ffc938b9047c4
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: rbs-trace
version: 0.5.1
source:
type: rubygems
- name: regexp_parser
version: '2.8'
source:
Expand Down Expand Up @@ -121,6 +149,18 @@ gems:
revision: 01361bb0fd6e2f3e2da2b11a733ffc938b9047c4
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: singleton
version: '0'
source:
type: stdlib
- name: socket
version: '0'
source:
type: stdlib
- name: stringio
version: '0'
source:
type: stdlib
- name: tempfile
version: '0'
source:
Expand All @@ -129,6 +169,18 @@ gems:
version: '0'
source:
type: stdlib
- name: webmock
version: '3.19'
source:
type: git
name: ruby/gem_rbs_collection
revision: eb6867fdb70e82e3aac6b51623ed1b6760c3c072
remote: https://github.com/ruby/gem_rbs_collection.git
repo_dir: gems
- name: webrick
version: 1.9.1
source:
type: rubygems
- name: yard
version: '0.9'
source:
Expand Down
35 changes: 2 additions & 33 deletions rb/sig/lib/selenium/webdriver.rbs
Original file line number Diff line number Diff line change
@@ -1,34 +1,3 @@
module Selenium
module WebDriver
class Point
attr_reader x: Integer
attr_reader y: Integer

def initialize: (Integer x, Integer y) -> void
end

class Dimension
attr_reader width: Integer
attr_reader height: Integer

def initialize: (Integer width, Integer height) -> void
end

class Rectangle
attr_reader x: Integer
attr_reader y: Integer
attr_reader width: Integer
attr_reader height: Integer

def initialize: (Integer x, Integer y, Integer width, Integer height) -> void
end

@root: String

def self.root: () -> String

def self.for: (*untyped args) -> untyped

def self.logger: (**String | Symbol opts) -> WebDriver::Logger
end
module Selenium::WebDriver
def self.logger: (**untyped) -> Selenium::WebDriver::Logger
end
14 changes: 2 additions & 12 deletions rb/sig/lib/selenium/webdriver/chrome.rbs
Original file line number Diff line number Diff line change
@@ -1,13 +1,3 @@
module Selenium
module WebDriver
module Chrome
self.@path: String

@path: String

def self.path=: (String path) -> String

def self.path: () -> String?
end
end
module Selenium::WebDriver::Chrome
def self.path: () -> nil
end
18 changes: 3 additions & 15 deletions rb/sig/lib/selenium/webdriver/chrome/driver.rbs
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
module Selenium
module WebDriver
module Chrome
class Driver < Chromium::Driver
include LocalDriver
class Selenium::WebDriver::Chrome::Driver
def initialize: (?options: Selenium::WebDriver::Chrome::Options, ?service: Selenium::WebDriver::Chrome::Service, ?url: nil, **nil) -> void

def initialize: (?options: untyped?, ?service: untyped?, ?url: untyped?, **untyped opts) -> void

def browser: () -> Symbol

private

def devtools_address: () -> String
end
end
end
def browser: () -> Symbol
end
17 changes: 3 additions & 14 deletions rb/sig/lib/selenium/webdriver/chrome/features.rbs
Original file line number Diff line number Diff line change
@@ -1,16 +1,5 @@
module Selenium
module WebDriver
module Chrome
module Features
include WebDriver::Chromium::Features
module Selenium::WebDriver::Chrome::Features
def commands: (Symbol) -> Array[untyped]

CHROME_COMMANDS: Hash[Symbol, Array[Symbol | String]]
COMMANDS: Hash[Symbol, Array[Symbol | String]]

def command_list: -> Hash[Symbol, Array[Symbol | String]]

def commands: (Symbol command) -> Array[Symbol | String]
end
end
end
def command_list: () -> Hash[untyped, untyped]
end
18 changes: 2 additions & 16 deletions rb/sig/lib/selenium/webdriver/chrome/options.rbs
Original file line number Diff line number Diff line change
@@ -1,17 +1,3 @@
module Selenium
module WebDriver
module Chrome
class Options < Chromium::Options
KEY: String

BROWSER: String

private

def enable_logging: (untyped browser_options) -> untyped

def binary_path: () -> untyped
end
end
end
class Selenium::WebDriver::Chrome::Options
def binary_path: () -> nil
end
20 changes: 2 additions & 18 deletions rb/sig/lib/selenium/webdriver/chrome/service.rbs
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
module Selenium
module WebDriver
module Chrome
class Service < WebDriver::Service
DRIVER_PATH_ENV_KEY: String

@log: untyped

DEFAULT_PORT: Integer

EXECUTABLE: String

SHUTDOWN_SUPPORTED: bool

def log: () -> untyped
end
end
end
class Selenium::WebDriver::Chrome::Service
def log: () -> nil
end
43 changes: 3 additions & 40 deletions rb/sig/lib/selenium/webdriver/chromium/features.rbs
Original file line number Diff line number Diff line change
@@ -1,42 +1,5 @@
module Selenium
module WebDriver
module Chromium
module Features
include _Bridge
module Selenium::WebDriver::Chromium::Features
def network_conditions=: (Hash[untyped, untyped]) -> nil

CHROMIUM_COMMANDS: Hash[Symbol, Array[Symbol | String]]

def commands: (Symbol command) -> Array[Symbol | String]

def launch_app: (String id) -> String

def cast_sinks: () -> Array[String]

def cast_sink_to_use=: (String name) -> untyped

def cast_issue_message: () -> String

def start_cast_tab_mirroring: (String name) -> untyped

def start_cast_desktop_mirroring: (String name) -> untyped

def stop_casting: (String name) -> untyped

def set_permission: (String name, String value) -> untyped

def network_conditions: () -> Hash[untyped, untyped]

def network_conditions=: (Hash[Symbol | String, Integer | bool] conditions) -> untyped

def delete_network_conditions: () -> untyped

def send_command: (Hash[String | Symbol, untyped] command_params) -> untyped

def available_log_types: () -> Array[Symbol]

def log: (Symbol type) -> Array[Hash[String, untyped]] |
(Symbol type) -> Array[LogEntry]
end
end
end
def network_conditions: () -> Hash[untyped, untyped]
end
56 changes: 6 additions & 50 deletions rb/sig/lib/selenium/webdriver/chromium/options.rbs
Original file line number Diff line number Diff line change
@@ -1,53 +1,9 @@
module Selenium
module WebDriver
module Chromium
class Options < WebDriver::Options
include _Options
class Selenium::WebDriver::Chromium::Options
def initialize: (?profile: nil, **Array[untyped]) -> void
| (?profile: nil, **nil) -> void

@profile: untyped
def process_browser_options: (Hash[untyped, untyped]) -> void

@options: untyped

@logging_prefs: untyped

@encoded_extensions: untyped

@extensions: untyped

attr_accessor profile: untyped

attr_accessor logging_prefs: untyped

CAPABILITIES: Hash[Symbol, String]

attr_reader extensions: untyped

def initialize: (?profile: untyped?, **untyped opts) -> void

def add_extension: (untyped path) -> untyped

def extensions=: (untyped extensions) -> untyped

def add_encoded_extension: (untyped encoded) -> untyped

def add_argument: (untyped arg) -> untyped

def add_preference: (untyped name, untyped value) -> untyped

def add_emulation: (**untyped opts) -> untyped

def enable_android: (?package: String, ?serial_number: untyped?, ?use_running_app: untyped?, ?activity: untyped?) -> untyped

def process_browser_options: (untyped browser_options) -> untyped?

def binary_path: () -> untyped

def encode_extension: (untyped path) -> untyped

def validate_extension: (untyped path) -> untyped

def camelize?: (untyped key) -> untyped
end
end
end
def camelize?: (Symbol) -> bool
| (String) -> bool
end
Loading