Conversation
…enium 4.50 Selenium 4.50 deprecates HttpCommandExecutor.client (public access), httpClientFactory, the factory-based constructors and getAddressOfRemoteServer(). It also deprecates HasBiDi.getBiDi() and maybeGetBiDi() in favour of getHandle(). - Bump Selenium to 4.50.0 and use the new HttpCommandExecutor(HttpClient, Map, URL) constructor. - Keep our own HttpClient.Factory in AppiumCommandExecutor and make getClient() public, so AppiumDriver no longer reads the fields. - Get the server URL from AppiumClientConfig / AppiumDriver.getRemoteAddress(). - Override getHandle(), and keep getBiDi()/maybeGetBiDi() for users since Selenium has no replacement for context-scoped listeners yet. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… client - Direct connect now switches the target of a SwitchableHttpClient that AppiumCommandExecutor passes to Selenium, instead of replacing the final client field by reflection. The previous client is closed. - For executors that are not AppiumCommandExecutor, AppiumDriver creates its own HTTP client for log websockets (as BiDi already does) and closes it on quit. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 of 3 tasks
Contributor
Author
|
I am leaving this parked for a while since the current code does not look good. I made a couple of changes in Selenium to improve this PR but I need to wait for 4.51 to be released. If it is ok with you, please leave this PR open and I will come back to it after the next Selenium release. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change list
AppiumCommandExecutorkeeps its ownHttpClient.Factoryand uses the newHttpCommandExecutor(HttpClient, Map, URL)constructor.AppiumCommandExecutor.getClient()is now public, soAppiumDriverno longer readsHttpCommandExecutor.client.AppiumClientConfigorAppiumDriver.getRemoteAddress(), not fromgetAddressOfRemoteServer().AppiumDriveroverridesgetHandle(), which is the new way Selenium gives BiDi access.HttpCommandExecutor.client:SwitchableHttpClient) instead of replacing the field. The old client is now closed.HttpCommandExecutor,AppiumDrivercreates its own HTTP client for the log websockets (same as BiDi already does) and closes it onquit().Types of changes
What types of changes are you proposing/introducing to Java client?
Put an
xin the boxes that applyDetails
Selenium 4.50 deprecated some
HttpCommandExecutorfields and methods that Appium uses (SeleniumHQ/selenium#18038, SeleniumHQ/selenium#18098). In Selenium 4.52,clientbecomes protected andhttpClientFactoryis removed. Without this change, Appium would break with Selenium 4.52.Notes:
getBiDi()andmaybeGetBiDi()stay. Selenium deprecated them, but it has no replacement yet for listeners on one browsing context, such asNATIVE_CONTEXT.getAddressOfRemoteServer()is still called only when someone passes their ownHttpCommandExecutor(not Appium's). Selenium has no replacement for that case.🤖 Generated with Claude Code