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

[java] Remove deprecated methods that use capabilities in WebDrivers #10427

Merged
merged 7 commits into from
Jun 9, 2022

Conversation

pujagani
Copy link
Contributor

@pujagani pujagani commented Mar 9, 2022

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

Remove deprecated methods that use capabilities in WebDrivers

Motivation and Context

It is recommended to use browser-specific options instead of capabilities. Hence, the WebDriver implementation constructors that use capabilities are deprecated. These have been deprecated for multiple versions.

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.

@codecov-commenter
Copy link

codecov-commenter commented Mar 9, 2022

Codecov Report

Merging #10427 (876aeda) into trunk (7bd9b06) will increase coverage by 1.64%.
The diff coverage is 43.75%.

@@            Coverage Diff             @@
##            trunk   #10427      +/-   ##
==========================================
+ Coverage   46.56%   48.20%   +1.64%     
==========================================
  Files          86       86              
  Lines        5863     5570     -293     
  Branches      278      279       +1     
==========================================
- Hits         2730     2685      -45     
+ Misses       2855     2606     -249     
- Partials      278      279       +1     
Impacted Files Coverage Δ
py/selenium/webdriver/common/action_chains.py 32.00% <ø> (-0.29%) ⬇️
py/selenium/webdriver/remote/webelement.py 34.80% <ø> (+1.84%) ⬆️
...lenium/webdriver/support/event_firing_webdriver.py 18.85% <ø> (+8.30%) ⬆️
py/selenium/webdriver/remote/webdriver.py 38.98% <40.00%> (-2.92%) ⬇️
py/selenium/webdriver/remote/file_detector.py 100.00% <100.00%> (ø)
py/selenium/webdriver/remote/remote_connection.py 30.49% <0.00%> (-0.52%) ⬇️
py/selenium/types.py 100.00% <0.00%> (ø)
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f9018c6...876aeda. Read the comment docs.

@pujagani pujagani marked this pull request as draft March 10, 2022 06:17
@sonarcloud
Copy link

sonarcloud bot commented Mar 10, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

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

No Coverage information No Coverage information
0.0% 0.0% Duplication

@titusfortner
Copy link
Member

fwiw I'm 👎 on this for now. I'd like for us to keep it deprecated, but continue to support using MutableCapabilities that are w3c compliant. I think DesiredCapabilities *always toggles JWP, so removing ability to send JWP syntax will de facto remove the ability to use that method in a "bad" way for now, so I want to do that one first.

@titusfortner
Copy link
Member

Well, I take this back. Looks like Capabilities were only deprecated for local drivers, not RemoteWebDriver. I'm actually ok with this one if we want to do it, but think we should wait for Selenium 4.3.

Copy link
Member

@titusfortner titusfortner left a comment

Choose a reason for hiding this comment

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

Let's do this for Selenium 4.3

@titusfortner titusfortner added this to the 4.3 milestone May 9, 2022
@pujagani pujagani marked this pull request as ready for review May 11, 2022 04:58
@diemol diemol merged commit 7f0c563 into SeleniumHQ:trunk Jun 9, 2022
@sonarcloud
Copy link

sonarcloud bot commented Jun 9, 2022

SonarCloud Quality Gate failed.    Quality Gate failed

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

0.0% 0.0% Coverage
0.0% 0.0% Duplication

elgatov pushed a commit to elgatov/selenium that referenced this pull request Jun 27, 2022
…eleniumHQ#10427)

* [java] Remove deprecated methods that use capabilities in WebDrivers

Co-authored-by: Diego Molina <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants