Skip to content

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

@titusfortner

Description

@titusfortner

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);

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions