SeleniumHQ / selenium

A browser automation framework and ecosystem.
https://selenium.dev
Apache License 2.0
29.81k stars 8.03k forks source link

[🚀 Feature]: Better compatibility with Appium #13949

Open mykola-mokhnach opened 1 month ago

mykola-mokhnach commented 1 month ago

Feature and motivation

We would like to improve the compatibility between Appium and Selenium java clients. As the first step it would make sense to avoid using reflection to access various private properties of selenium classes and only rely on public or protected interfaces.

Usage example

Here is the list of changes needed to be done in order to enhance the compatibility:

Increase the scope of private properties of the below classes to 'protected':

RemoteWebDriver -> capabilities

HttpCommandExecutor -> commandCodec

HttpCommandExecutor -> responseCodec

FluentWait -> clock FluentWait -> timeout FluentWait -> interval FluentWait -> sleeper FluentWait -> ignoredExceptions FluentWait -> messageSupplier FluentWait -> input

Make public accessor for the property:

HttpCommandExecutor -> client

DriverService.Builder -> exe

github-actions[bot] commented 1 month ago

@mykola-mokhnach, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

iampopovich commented 2 weeks ago

@pujagani @diemol Is it sufficient within the scope of this task to only change access modifiers? For backward compatibility and to maintain the logic in the getter and setter methods for the protected fields of the classes, they need to be left unchanged

pujagani commented 2 weeks ago

I think so that should suffice.