Skip to content

Commit 3338c08

Browse files
authored
Fixing NPE when "se:downloadsEnabled" not set (#13583)
Fixes the NPE described in #13578 Co-authored-by: Trig <[email protected]>
1 parent b6b2096 commit 3338c08

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public interface HasDownloads {
3333
* @throws WebDriverException if capability to enable downloads is not set
3434
*/
3535
default void requireDownloadsEnabled(Capabilities capabilities) {
36-
boolean downloadsEnabled = (boolean) capabilities.getCapability("se:downloadsEnabled");
36+
boolean downloadsEnabled = capabilities.is("se:downloadsEnabled");
3737
if (!downloadsEnabled) {
3838
throw new WebDriverException(
3939
"You must enable downloads in order to work with downloadable files.");

0 commit comments

Comments
 (0)