-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
[rb] Add websocket-port parameter to firefox service #15458
base: trunk
Are you sure you want to change the base?
[rb] Add websocket-port parameter to firefox service #15458
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
…rt' into rb_add_argument_for_websocket_port
User description
Motivation and Context
This change is needed about mozilla/geckodriver#2218
By having the --websocket-port parameter by default we avoid port collisions when using BiDi with the geckodriver
The general issue for all the selenium bindings is #15451
Types of changes
Checklist
PR Type
Enhancement, Tests
Description
Added
--websocket-port
parameter to Firefox service to avoid port collisions.Introduced
Support::Sockets.free_port
method to dynamically allocate free ports.Updated unit and integration tests to validate websocket port behavior.
Added type signature for
Support::Sockets.free_port
in RBS file.Changes walkthrough 📝
service.rb
Add `--websocket-port` parameter to Firefox service
rb/lib/selenium/webdriver/firefox/service.rb
--websocket-port
parameter to service initialization.Support::Sockets.free_port
.--connect-existing
.support.rb
Add `Support::Sockets` requirement for port management
rb/lib/selenium/webdriver/support.rb
selenium/webdriver/support/sockets
for port management.sockets.rb
Introduce `Support::Sockets` module for port management
rb/lib/selenium/webdriver/support/sockets.rb
Support::Sockets
module for managing free ports.free_port
method to find and return an available port.sockets.rbs
Add type signature for `Support::Sockets.free_port`
rb/sig/selenium/web_driver/support/sockets.rbs
Support::Sockets.free_port
method.service_spec.rb
Add integration tests for websocket port behavior
rb/spec/integration/selenium/webdriver/firefox/service_spec.rb
services.
service_spec.rb
Update unit tests for websocket port parameter
rb/spec/unit/selenium/webdriver/firefox/service_spec.rb
--websocket-port
parameter behavior.--connect-existing
argument.