-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
[java]: add websocket-port
test and --connect-existing
check
#15462
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
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
I don't think the args can contain that flag. The service instances in Java creates args by each method in the builder, not by passing in an array of args directly. |
@titusfortner yes, that's true, do you know where and how should I access the builder args? Also, java bindings already used a different websocket port in case of BiDi, but it didn't had a check for |
So, the current code doesn't allow specifying either To support Then in the createArgs if the user defined the marionette port you pass that in instead of a websocket port |
641a3a3
to
15e4fdf
Compare
@navin772, what is left to do here? I see many open conversations. |
@diemol I think there were some issues in accessing the passed args and need to add a new method |
I have added 2 methods - |
User description
Thanks for contributing to Selenium!
A PR well described will help maintainers to quickly review and merge it
Before submitting your PR, please check our contributing guidelines.
Avoid large PRs, help reviewers by making them as simple and short as possible.
Motivation and Context
Java fix for #15451.
Java already uses a free websocket port for new firefox webdriver sessions. This PR adds a check for the
--connect-existing
flag and a BiDi based test for multiple Firefox driver sessions.Types of changes
Checklist
PR Type
Bug fix, Tests
Description
Added a check for the
--connect-existing
flag inGeckoDriverService
to avoid websocket port conflicts.Enhanced logic to allocate websocket ports only when not connecting to an existing Firefox instance.
Introduced a BiDi-based test to verify multiple Firefox driver sessions with unique websocket ports.
Ensured proper validation of BiDi websocket URLs and port uniqueness in the new test.
Changes walkthrough 📝
GeckoDriverService.java
Add `--connect-existing` check and websocket port allocation logic
java/src/org/openqa/selenium/firefox/GeckoDriverService.java
--connect-existing
flag.instance.
instances.
FirefoxDriverConcurrentTest.java
Add BiDi test for multiple Firefox instances
java/test/org/openqa/selenium/firefox/FirefoxDriverConcurrentTest.java