feat: add creating a driver with ClientConfig #1735
Merged
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
Current Java client does not have a way to generates a http client with
ClientConfig clientConfig.When we give
URL remoteAddressto the AppiumDriver, it generates a defaultclientConfigas below to create a http client instance. So, in case users want to configure proxy etc to the http client, they need to define their own http factory method for now.It seems like recent selenium v4 java client allows users to configure the http client (with the default netty client) by giving clientConfig like:
https://docs.saucelabs.com/web-apps/automated-testing/selenium/selenium4/
Current out method does not provide the same syntax, but it would be worth giving users to configure the http client with
ClientConfigwithout defining HTTP factory method. Many examples in the internet explain factory method with okhttp, but selenium v4 no longer supports okhttp by default. So this ClientConfig method helps users to configure client proxy etc than defining their own factory.In case a user wants to define their own http client, they can use existing method to start a driver with
HttpClient.FactoryTypes of changes
What types of changes are you proposing/introducing to Java client?
Put an
xin the boxes that apply