selenium icon indicating copy to clipboard operation
selenium copied to clipboard

[java] increasing of properties scope for better appium compatibility

Open iampopovich opened this issue 8 months ago • 2 comments

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.

Description

according to request in #13949 scopes of properties were increased here's a part of request

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

Motivation and Context

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • [x] I have read the contributing document.
  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [ ] I have added tests to cover my changes.
  • [x] All new and existing tests passed.

PR Type

Enhancement


Description

  • Changed the access level of several fields in HttpCommandExecutor to improve compatibility with Appium:
    • client field changed to public.
    • commandCodec and responseCodec fields changed to protected.
  • Changed the access level of the capabilities field in RemoteWebDriver to protected.
  • Changed the access level of the exe field in DriverService.Builder to public.
  • Changed the access level of multiple fields in FluentWait to protected:
    • input, clock, sleeper, timeout, interval, messageSupplier, ignoredExceptions.

Changes walkthrough 📝

Relevant files
Enhancement
HttpCommandExecutor.java
Modify access levels for HttpCommandExecutor fields           

java/src/org/openqa/selenium/remote/HttpCommandExecutor.java

  • Changed client field to public.
  • Changed commandCodec and responseCodec fields to protected.
  • +3/-3     
    RemoteWebDriver.java
    Modify access level for RemoteWebDriver capabilities field

    java/src/org/openqa/selenium/remote/RemoteWebDriver.java

    • Changed capabilities field to protected.
    +1/-1     
    DriverService.java
    Modify access level for DriverService.Builder exe field   

    java/src/org/openqa/selenium/remote/service/DriverService.java

    • Changed exe field to public.
    +1/-1     
    FluentWait.java
    Modify access levels for FluentWait fields                             

    java/src/org/openqa/selenium/support/ui/FluentWait.java

  • Changed multiple fields to protected: input, clock, sleeper, timeout,
    interval, messageSupplier, ignoredExceptions.
  • +7/-7     

    💡 PR-Agent usage: Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    iampopovich avatar Jun 24 '24 07:06 iampopovich