Skip to content

[java] [cdp] Simplify Augmentation for Basic Auth#11601

Merged
pujagani merged 5 commits intoSeleniumHQ:trunkfrom
pujagani:augmenter-auth
Feb 2, 2023
Merged

[java] [cdp] Simplify Augmentation for Basic Auth#11601
pujagani merged 5 commits intoSeleniumHQ:trunkfrom
pujagani:augmenter-auth

Conversation

@pujagani
Copy link
Copy Markdown
Contributor

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

Simplify Augmentation for Basic Auth

Motivation and Context

Ensure the following code snippet works for the users, instead of providing BasicAuth implementation themselves :

ChromeOptions chromeOptions = new ChromeOptions();
WebDriver driver = new RemoteWebDriver(new URL("http://localhost:4444"), chromeOptions);
Augmenter augmenter = new Augmenter();

driver = augmenter.augment(driver);

((HasAuthentication) driver).register(UsernameAndPassword.of("admin", "admin"));

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.

@pujagani pujagani added C-java Java Bindings B-devtools Includes everything BiDi or Chrome DevTools related labels Jan 31, 2023
@pujagani pujagani marked this pull request as ready for review February 2, 2023 05:44
@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Feb 2, 2023

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.65%. Comparing base (2917d05) to head (49a59c9).
⚠️ Report is 4828 commits behind head on trunk.

Additional details and impacted files
@@           Coverage Diff           @@
##            trunk   #11601   +/-   ##
=======================================
  Coverage   54.65%   54.65%           
=======================================
  Files          85       85           
  Lines        5643     5643           
  Branches      244      244           
=======================================
  Hits         3084     3084           
  Misses       2315     2315           
  Partials      244      244           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@diemol diemol left a comment

Choose a reason for hiding this comment

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

Code changes look fine to me, thank you!

If CI looks good, feel free to merge

@pujagani pujagani merged commit ce0b6f1 into SeleniumHQ:trunk Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

B-devtools Includes everything BiDi or Chrome DevTools related C-java Java Bindings

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants