Skip to content

Commit 7d6d36f

Browse files
committed
added example how to use requireDownloadsEnabled method
1 parent cd138fc commit 7d6d36f

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

java/src/org/openqa/selenium/HasDownloads.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,14 @@ public interface HasDownloads {
2727
/**
2828
* Requires downloads to be enabled.
2929
*
30-
* <p>TODO: Create an example in the documentation and provide a link to it.
30+
* <p>Example usage:
31+
* <pre>
32+
* {@code
33+
* Capabilities capabilities = new Capabilities();
34+
* capabilities.setCapability("se:downloadsEnabled", true);
35+
* driver.requireDownloadsEnabled(capabilities);
36+
* }
37+
* </pre>
3138
*
3239
* @param capabilities the capabilities object
3340
* @throws WebDriverException if capability to enable downloads is not set

0 commit comments

Comments
 (0)