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

[πŸš€ Feature]: Add Download Support to Bindings #11657

Closed
titusfortner opened this issue Feb 14, 2023 · 4 comments
Closed

[πŸš€ Feature]: Add Download Support to Bindings #11657

titusfortner opened this issue Feb 14, 2023 · 4 comments
Assignees
Milestone

Comments

@titusfortner
Copy link
Member

titusfortner commented Feb 14, 2023

Status

Java Python Ruby .NET JavaScript
PR #12979 #13023 #12037 #12981 #13102
Capability Method βœ… βœ… βœ… βœ… βœ…
Capability Protected βœ… βœ… βœ… βœ… βœ…
Name List βœ… βœ… βœ… βœ… βœ…
Directory Download βœ… βœ… βœ… βœ… ?
Create Directory βœ… βœ… βœ… βœ… βœ…
Delete βœ… βœ… βœ… βœ… βœ…

Feature and motivation

For the bindings we want to require the user to both enable downloads since we don't want that to be default behavior, and then have the ability to get the list of available files (#11458), and to download a specific file (#11466).

This is going to rely on Grid implementation in #11656

My Java syntax proposal is below, feedback appreciated.

Usage example

chromeOptions.enableDownloads(true);
driver = new RemoteWebDriver(url, chromeOptions);

driver.get(siteUrl);
driver.findElement(By.id("download-this")).click();
List<Map<String, String>> downloadedFiles = ((HasDownloads) driver).getDownloads();
String fileToDownload = downloadedFiles.get(0).get("name");
((HasDownloads) driver).getDownload(fileToDownload, outputStream);
@github-actions
Copy link

@titusfortner, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@titusfortner
Copy link
Member Author

@harsha509 can you help me with the PR I made and tell me if it should work?

@harsha509 harsha509 removed the C-nodejs label Jan 4, 2024
@harsha509
Copy link
Member

Closing as completed!

Copy link

github-actions bot commented Feb 4, 2024

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Feb 4, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants