-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[rb] Add websocket-port parameter to firefox service #15458
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
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
|
This doesn't actually work if your testing framework launches multiple threads as they all try and use the same port and most of them fail - using |
|
PortProber should create a new port dynamically per instance, is that not working for you? Can you crate a new issue with logs? |
|
I've created #15707. |
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-portparameter to Firefox service to avoid port collisions.Introduced
Support::Sockets.free_portmethod to dynamically allocate free ports.Updated unit and integration tests to validate websocket port behavior.
Added type signature for
Support::Sockets.free_portin RBS file.Changes walkthrough 📝
service.rb
Add `--websocket-port` parameter to Firefox servicerb/lib/selenium/webdriver/firefox/service.rb
--websocket-portparameter to service initialization.Support::Sockets.free_port.--connect-existing.support.rb
Add `Support::Sockets` requirement for port managementrb/lib/selenium/webdriver/support.rb
selenium/webdriver/support/socketsfor port management.sockets.rb
Introduce `Support::Sockets` module for port managementrb/lib/selenium/webdriver/support/sockets.rb
Support::Socketsmodule for managing free ports.free_portmethod 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_portmethod.service_spec.rb
Add integration tests for websocket port behaviorrb/spec/integration/selenium/webdriver/firefox/service_spec.rb
services.
service_spec.rb
Update unit tests for websocket port parameterrb/spec/unit/selenium/webdriver/firefox/service_spec.rb
--websocket-portparameter behavior.--connect-existingargument.