-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] added example how to use requireDownloadsEnabled method #14918
base: trunk
Are you sure you want to change the base?
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
* <p>Example usage: | ||
* | ||
* <pre>{@code | ||
* Capabilities capabilities = new Capabilities(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capabilities is an interface. I suggest used ChromeOptions as an implemented class in the example.
applied format.sh
5f08b0a
to
c06a761
Compare
@pujagani done |
* <p>Example usage: | ||
* | ||
* <pre>{@code | ||
* ChromeOptions options = new ChromeOptions(); | ||
* options.setCapability("se:downloadsEnabled", true); | ||
* driver.requireDownloadsEnabled(options); | ||
* }</pre> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What was meant by "Create an example in the documentation and provide a link to it.", was to create a code example in the documentation repository and point to it.
So the JavaDoc should have a phrase pointing to https://www.selenium.dev/documentation/webdriver/drivers/remote_webdriver/#downloads.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@diemol thanks for your advice 🙏
I'll finish it later this week
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
This pull request includes an improvement to the documentation of the
HasDownloads
interface. The change provides an example usage of therequireDownloadsEnabled
method, which enhances the clarity and usability of the documentation.Documentation improvement:
java/src/org/openqa/selenium/HasDownloads.java
: Added an example usage of therequireDownloadsEnabled
method in the Javadoc comment to help users understand how to enable downloads using capabilities.Motivation and Context
I’m just striving to complete as many TODOs in the project as I can handle 🙂
Types of changes
Checklist
PR Type
Documentation
Description
HasDownloads
interface by adding a practical code exampleCapabilities
objectChanges walkthrough 📝
HasDownloads.java
Add usage example for requireDownloadsEnabled method
java/src/org/openqa/selenium/HasDownloads.java
requireDownloadsEnabled
method