Skip to content

[java] Use one HttpClient.Factory inside one RemoteWebDriver instance - #18038

Merged
joerg1985 merged 1 commit into
trunkfrom
bidi-client-factory
Sep 17, 2026
Merged

joerg1985 merged 1 commit into
trunkfrom
bidi-client-factory

Conversation

@joerg1985

Copy link
Copy Markdown
Member

🔗 Related Issues

#17814 does restrict the access to BiDi internals, but we should in my mind allow to use the same HttpClient.Factory used with the CommandExecutor inside the BiDi internals.

💥 What does this PR do?

Allow to pass a HttpClient.Factory to the RemoteWebDriver instance to initialize the client used for BiDi.
This PR will also ensure a TracedHttpClient.Factory will be used inside the BiDi initialization, if the tracing flag was set.
And some cleanup related to the HttpCommandExecutor and the HttpClient.Factory.

🔧 Implementation Notes

  • deprecated the old HttpCommandExecutor constructors and add a new to only pass the client
  • deprecated the HttpClient.Factory.cleanupIdleClients method and call it from the client (this can get removed from the interface, as the client knows the factory type, it could call a cleanup method on the type)
  • added a constructor to the RemoteWebDriver to pass a CommandExecutor and the HttpClient.Factory

🤖 AI assistance

  • No substantial AI assistance used
  • AI assisted (complete below)
    • Tool(s):
    • What was generated:
    • I reviewed all AI output and can explain the change

💡 Additional Considerations

🔄 Types of changes

  • Cleanup (formatting, renaming)

@qodo-code-review

Copy link
Copy Markdown
Contributor

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@selenium-ci selenium-ci added the C-java Java Bindings label Sep 16, 2026

@diemol diemol left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside of the comments due to the method remova, looks fine to me.

Comment thread java/src/org/openqa/selenium/remote/HttpCommandExecutor.java
Comment thread java/src/org/openqa/selenium/remote/HttpCommandExecutor.java
@joerg1985
joerg1985 marked this pull request as draft September 17, 2026 07:27
@joerg1985
joerg1985 marked this pull request as ready for review September 17, 2026 15:04
@qodo-code-review

Copy link
Copy Markdown
Contributor

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@joerg1985
joerg1985 merged commit 833ca3b into trunk Sep 17, 2026
46 checks passed
@joerg1985
joerg1985 deleted the bidi-client-factory branch September 17, 2026 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-java Java Bindings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants