Skip to content

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

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

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
Labels
I-enhancement Something could be better
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);
@titusfortner titusfortner added I-enhancement Something could be better A-needs-triaging A Selenium member will evaluate this soon! C-py Python Bindings C-rb Ruby Bindings C-dotnet .NET Bindings C-java Java Bindings C-nodejs JavaScript Bindings and removed A-needs-triaging A Selenium member will evaluate this soon! labels Feb 14, 2023
@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!

@diemol diemol added this to the 4.10 milestone May 15, 2023
@titusfortner titusfortner modified the milestones: 4.10, 4.11 May 15, 2023
@titusfortner titusfortner modified the milestones: 4.11, 4.12 Jun 28, 2023
@titusfortner titusfortner modified the milestones: 4.12, 4.13 Aug 2, 2023
@titusfortner titusfortner self-assigned this Aug 2, 2023
@titusfortner titusfortner modified the milestones: 4.13, 4.14 Sep 11, 2023
@titusfortner titusfortner modified the milestones: 4.14, 4.15 Oct 5, 2023
@titusfortner titusfortner removed C-py Python Bindings C-rb Ruby Bindings C-dotnet .NET Bindings labels Nov 1, 2023
@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 JavaScript Bindings 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.
Labels
I-enhancement Something could be better
Projects
None yet
Development

No branches or pull requests

3 participants