Skip to content

Commit 3971e29

Browse files
committed
Extend the browsers that will be augmented to provide webstorage
List of browsers has been determined by looking at the current set of browsers that implement `WebStorage`
1 parent 9e4122b commit 3971e29

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

java/src/org/openqa/selenium/remote/html5/AddWebStorage.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,27 @@
2020
import org.openqa.selenium.Capabilities;
2121
import org.openqa.selenium.html5.WebStorage;
2222
import org.openqa.selenium.remote.AugmenterProvider;
23+
import org.openqa.selenium.remote.BrowserType;
2324
import org.openqa.selenium.remote.ExecuteMethod;
2425

2526
import java.util.function.Predicate;
2627

28+
import static org.openqa.selenium.remote.BrowserType.CHROME;
29+
import static org.openqa.selenium.remote.BrowserType.EDGE;
30+
import static org.openqa.selenium.remote.BrowserType.FIREFOX;
31+
import static org.openqa.selenium.remote.BrowserType.OPERA;
2732
import static org.openqa.selenium.remote.CapabilityType.SUPPORTS_WEB_STORAGE;
2833

2934
public class AddWebStorage implements AugmenterProvider<WebStorage> {
3035

3136
@Override
3237
public Predicate<Capabilities> isApplicable() {
33-
return caps -> caps.is(SUPPORTS_WEB_STORAGE);
38+
return caps ->
39+
FIREFOX.equals(caps.getBrowserName()) ||
40+
CHROME.equals(caps.getBrowserName()) ||
41+
EDGE.equals(caps.getBrowserName()) ||
42+
OPERA.equals(caps.getBrowserName()) ||
43+
caps.is(SUPPORTS_WEB_STORAGE);
3444
}
3545

3646
@Override

0 commit comments

Comments
 (0)