-
-
Notifications
You must be signed in to change notification settings - Fork 8.6k
Closed
Description
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
I-enhancementSomething could be betterSomething could be better