Skip to content

Commit

Permalink
added example how to use requireDownloadsEnabled method
Browse files Browse the repository at this point in the history
  • Loading branch information
iampopovich committed Dec 19, 2024
1 parent cd138fc commit 7d6d36f
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion java/src/org/openqa/selenium/HasDownloads.java
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,14 @@ public interface HasDownloads {
/**
* Requires downloads to be enabled.
*
* <p>TODO: Create an example in the documentation and provide a link to it.
* <p>Example usage:
* <pre>
* {@code
* Capabilities capabilities = new Capabilities();
* capabilities.setCapability("se:downloadsEnabled", true);
* driver.requireDownloadsEnabled(capabilities);
* }
* </pre>
*
* @param capabilities the capabilities object
* @throws WebDriverException if capability to enable downloads is not set
Expand Down

0 comments on commit 7d6d36f

Please sign in to comment.