diff --git a/java/src/org/openqa/selenium/remote/html5/AddWebStorage.java b/java/src/org/openqa/selenium/remote/html5/AddWebStorage.java index 5fcf5df0fa2c5..29bb881b307a6 100644 --- a/java/src/org/openqa/selenium/remote/html5/AddWebStorage.java +++ b/java/src/org/openqa/selenium/remote/html5/AddWebStorage.java @@ -20,17 +20,27 @@ import org.openqa.selenium.Capabilities; import org.openqa.selenium.html5.WebStorage; import org.openqa.selenium.remote.AugmenterProvider; +import org.openqa.selenium.remote.BrowserType; import org.openqa.selenium.remote.ExecuteMethod; import java.util.function.Predicate; +import static org.openqa.selenium.remote.BrowserType.CHROME; +import static org.openqa.selenium.remote.BrowserType.EDGE; +import static org.openqa.selenium.remote.BrowserType.FIREFOX; +import static org.openqa.selenium.remote.BrowserType.OPERA; import static org.openqa.selenium.remote.CapabilityType.SUPPORTS_WEB_STORAGE; public class AddWebStorage implements AugmenterProvider { @Override public Predicate isApplicable() { - return caps -> caps.is(SUPPORTS_WEB_STORAGE); + return caps -> + FIREFOX.equals(caps.getBrowserName()) || + CHROME.equals(caps.getBrowserName()) || + EDGE.equals(caps.getBrowserName()) || + OPERA.equals(caps.getBrowserName()) || + caps.is(SUPPORTS_WEB_STORAGE); } @Override