From 42796da27c9c4a0334c93f29004cba93cbde8977 Mon Sep 17 00:00:00 2001 From: titusfortner Date: Sun, 8 Oct 2023 15:32:35 -0500 Subject: [PATCH] [java] do not need to check for non-w3c capability javascriptEnabled --- java/src/org/openqa/selenium/Capabilities.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/java/src/org/openqa/selenium/Capabilities.java b/java/src/org/openqa/selenium/Capabilities.java index 4a5fe4361e076..683e5e4e41b7d 100644 --- a/java/src/org/openqa/selenium/Capabilities.java +++ b/java/src/org/openqa/selenium/Capabilities.java @@ -77,8 +77,7 @@ default String getBrowserVersion() { default boolean is(String capabilityName) { Object cap = getCapability(capabilityName); if (cap == null) { - // If it's not set explicitly, javascriptEnabled is true. - return "javascriptEnabled".equals(capabilityName); + return false; } return cap instanceof Boolean ? (Boolean) cap : Boolean.parseBoolean(String.valueOf(cap)); }