Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decorator should honour implementation checks #11438

Merged
merged 1 commit into from
Dec 20, 2022

Conversation

krmahadevan
Copy link
Contributor

Fixes #11432

The current web driver decorator looks for
Class name compatibility against a bunch of interfaces.

So this works with we use WebDriver but does not
Work when we use RemoteWebDriver.

Altered the logic to use assignability checks between classes instead of doing a equals check.

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.

The current web driver decorator looks for
Class name compatibility against a bunch of interfaces.

So this works with we use WebDriver but does not
Work when we use RemoteWebDriver.

Altered the logic to use assignability checks between classes instead of doing a equals check.

Description

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

  • 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.
  • All new and existing tests passed.

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@codecov-commenter
Copy link

Codecov Report

Base: 54.54% // Head: 54.54% // No change to project coverage 👍

Coverage data is based on head (8dd4e3e) compared to base (e8e5771).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk   #11438   +/-   ##
=======================================
  Coverage   54.54%   54.54%           
=======================================
  Files          85       85           
  Lines        5627     5627           
  Branches      243      243           
=======================================
  Hits         3069     3069           
  Misses       2315     2315           
  Partials      243      243           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pujagani
Copy link
Contributor

I debugged through the fix and it is solving the issue accurately. Overall, PR looks good to me. Once the comments are addressed and all checks pass, I will merge the PR. Thank you!

@krmahadevan
Copy link
Contributor Author

I debugged through the fix and it is solving the issue accurately. Overall, PR looks good to me. Once the comments are addressed and all checks pass, I will merge the PR. Thank you!

I have addressed the review comment and responded to the other one. Also rebased off of trunk and force pushed the amended commit. Please help take a look

Copy link
Contributor

@pujagani pujagani left a comment

Choose a reason for hiding this comment

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

Thank you @krmahadevan!

Fixes SeleniumHQ#11432

The current web driver decorator looks for 
Class name compatibility against a bunch of interfaces.

So this works with we use WebDriver but does not
Work when we use RemoteWebDriver.

Altered the logic to use assignability checks between
classes instead of doing a equals check.
@pujagani pujagani merged commit 6f951b2 into SeleniumHQ:trunk Dec 20, 2022
@krmahadevan krmahadevan deleted the fix_11432 branch December 21, 2022 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: Issue when using EventFiringDecorator<T> on RemoteWebdriver.
3 participants