Skip to content

Commit

Permalink
[java] deprecate all html5 offline storage implementations See #10397
Browse files Browse the repository at this point in the history
these are currently implemented by executing JavaScript
  • Loading branch information
titusfortner committed Dec 29, 2023
1 parent 6305e1a commit 8979563
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 2 deletions.
2 changes: 2 additions & 0 deletions java/src/org/openqa/selenium/chromium/ChromiumDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -292,11 +292,13 @@ public void register(Predicate<URI> whenThisMatches, Supplier<Credentials> useTh
}

@Override
@Deprecated
public LocalStorage getLocalStorage() {
return webStorage.getLocalStorage();
}

@Override
@Deprecated
public SessionStorage getSessionStorage() {
return webStorage.getSessionStorage();
}
Expand Down
2 changes: 2 additions & 0 deletions java/src/org/openqa/selenium/firefox/FirefoxDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,13 @@ public void setFileDetector(FileDetector detector) {
}

@Override
@Deprecated
public LocalStorage getLocalStorage() {
return webStorage.getLocalStorage();
}

@Override
@Deprecated
public SessionStorage getSessionStorage() {
return webStorage.getSessionStorage();
}
Expand Down
1 change: 1 addition & 0 deletions java/src/org/openqa/selenium/html5/AppCacheStatus.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
package org.openqa.selenium.html5;

/** Represents the application cache status. */
@Deprecated
public enum AppCacheStatus {
UNCACHED(0),
IDLE(1),
Expand Down
1 change: 1 addition & 0 deletions java/src/org/openqa/selenium/html5/LocalStorage.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@
* Represents the local storage for the site currently opened in the browser. Each site has its own
* separate storage area.
*/
@Deprecated
public interface LocalStorage extends Storage {}
1 change: 1 addition & 0 deletions java/src/org/openqa/selenium/html5/SessionStorage.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@
* unique set of session storage, one for each origin. Sites can add data to the session storage and
* it will be accessible to any page from the same site opened in that window.
*/
@Deprecated
public interface SessionStorage extends Storage {}
1 change: 1 addition & 0 deletions java/src/org/openqa/selenium/html5/Storage.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import java.util.Set;

/** Represents common operations available for all web storage types (session or local). */
@Deprecated
public interface Storage {

String getItem(String key);
Expand Down
1 change: 1 addition & 0 deletions java/src/org/openqa/selenium/html5/WebStorage.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.openqa.selenium.html5;

@Deprecated
public interface WebStorage {

LocalStorage getLocalStorage();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@
import org.openqa.selenium.remote.DriverCommand;
import org.openqa.selenium.remote.ExecuteMethod;

/** Executes the commands to access HTML5 localStorage on the remote webdriver server. */
/**
* Executes the commands to access HTML5 localStorage on the remote webdriver server.
*
* @deprecated LocalStorage can be managed by executing JavaScript. @see #executeScript(String,
* Object...)
*/
@Deprecated
public class RemoteLocalStorage implements LocalStorage {
private final ExecuteMethod executeMethod;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@
import org.openqa.selenium.remote.DriverCommand;
import org.openqa.selenium.remote.ExecuteMethod;

/** Executes the commands to access HTML5 sessionStorage on the remote webdriver server. */
/**
* Executes the commands to access HTML5 sessionStorage on the remote webdriver server.
*
* @deprecated LocalStorage can be managed by executing JavaScript. @see #executeScript(String,
* Object...)
*/
@Deprecated
public class RemoteSessionStorage implements SessionStorage {
private final ExecuteMethod executeMethod;

Expand Down

0 comments on commit 8979563

Please sign in to comment.