Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[java] Remove deprecated non-w3c compliant NetworkConnection interface #15270

Merged
merged 4 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions java/spotbugs-excludes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,7 @@
<Class name="org.openqa.selenium.json.JsonInputIterator"/>
<Bug pattern="IT_NO_SUCH_ELEMENT"/>
</Match>

<Match>
<Class name="org.openqa.selenium.mobile.NetworkConnection$ConnectionType"/>
<Bug pattern="IM_BAD_CHECK_FOR_ODD"/>
</Match>


<Match>
<Class name="org.openqa.selenium.net.NetworkUtils"/>
<Bug pattern="ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD"/>
Expand Down
1 change: 0 additions & 1 deletion java/src/org/openqa/selenium/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ java_export(
"internal/*.java",
"interactions/**/*.java",
"logging/**/*.java",
"mobile/*.java",
"net/*.java",
"virtualauthenticator/*.java",
"print/*.java",
Expand Down
18 changes: 0 additions & 18 deletions java/src/org/openqa/selenium/chromium/ChromiumDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
import org.openqa.selenium.json.TypeToken;
import org.openqa.selenium.logging.EventType;
import org.openqa.selenium.logging.HasLogEvents;
import org.openqa.selenium.mobile.NetworkConnection;
import org.openqa.selenium.remote.CommandExecutor;
import org.openqa.selenium.remote.FileDetector;
import org.openqa.selenium.remote.RemoteWebDriver;
Expand All @@ -70,7 +69,6 @@
import org.openqa.selenium.remote.http.ClientConfig;
import org.openqa.selenium.remote.http.ConnectionFailedException;
import org.openqa.selenium.remote.http.HttpClient;
import org.openqa.selenium.remote.mobile.RemoteNetworkConnection;

/**
* A {@link WebDriver} implementation that controls a Chromium browser running on the local machine.
Expand All @@ -87,7 +85,6 @@ public class ChromiumDriver extends RemoteWebDriver
HasNetworkConditions,
HasPermissions,
LocationContext,
NetworkConnection,
WebStorage {

public static final Predicate<String> IS_CHROMIUM_BROWSER =
Expand All @@ -97,7 +94,6 @@ public class ChromiumDriver extends RemoteWebDriver
private final Capabilities capabilities;
private final RemoteLocationContext locationContext;
private final RemoteWebStorage webStorage;
private final RemoteNetworkConnection networkConnection;
private final HasNetworkConditions networkConditions;
private final HasPermissions permissions;
private final HasLaunchApp launch;
Expand All @@ -115,7 +111,6 @@ protected ChromiumDriver(
locationContext = new RemoteLocationContext(getExecuteMethod());
webStorage = new RemoteWebStorage(getExecuteMethod());
permissions = new AddHasPermissions().getImplementation(getCapabilities(), getExecuteMethod());
networkConnection = new RemoteNetworkConnection(getExecuteMethod());
networkConditions =
new AddHasNetworkConditions().getImplementation(getCapabilities(), getExecuteMethod());
launch = new AddHasLaunchApp().getImplementation(getCapabilities(), getExecuteMethod());
Expand Down Expand Up @@ -317,19 +312,6 @@ public void setLocation(Location location) {
locationContext.setLocation(location);
}

@Override
@Deprecated
public ConnectionType getNetworkConnection() {
return networkConnection.getNetworkConnection();
}

@Override
@Deprecated
public ConnectionType setNetworkConnection(ConnectionType type) {
Require.nonNull("Network Connection Type", type);
return networkConnection.setNetworkConnection(type);
}

@Override
public void launchApp(String id) {
Require.nonNull("Launch App ID", id);
Expand Down
136 changes: 0 additions & 136 deletions java/src/org/openqa/selenium/mobile/NetworkConnection.java

This file was deleted.

3 changes: 0 additions & 3 deletions java/src/org/openqa/selenium/remote/DriverCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,6 @@ public interface DriverCommand {
// Logging API
String GET_AVAILABLE_LOG_TYPES = "getAvailableLogTypes";
String GET_LOG = "getLog";
// Mobile API
String GET_NETWORK_CONNECTION = "getNetworkConnection";
String SET_NETWORK_CONNECTION = "setNetworkConnection";
// Virtual Authenticator API
// http://w3c.github.io/webauthn#sctn-automation
String ADD_VIRTUAL_AUTHENTICATOR = "addVirtualAuthenticator";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
import static org.openqa.selenium.remote.DriverCommand.GET_FEDCM_DIALOG_TYPE;
import static org.openqa.selenium.remote.DriverCommand.GET_FEDCM_TITLE;
import static org.openqa.selenium.remote.DriverCommand.GET_LOCATION;
import static org.openqa.selenium.remote.DriverCommand.GET_NETWORK_CONNECTION;
import static org.openqa.selenium.remote.DriverCommand.GET_TIMEOUTS;
import static org.openqa.selenium.remote.DriverCommand.GET_TITLE;
import static org.openqa.selenium.remote.DriverCommand.GO_BACK;
Expand All @@ -73,7 +72,6 @@
import static org.openqa.selenium.remote.DriverCommand.SEND_KEYS_TO_ELEMENT;
import static org.openqa.selenium.remote.DriverCommand.SET_DELAY_ENABLED;
import static org.openqa.selenium.remote.DriverCommand.SET_LOCATION;
import static org.openqa.selenium.remote.DriverCommand.SET_NETWORK_CONNECTION;
import static org.openqa.selenium.remote.DriverCommand.SET_SCRIPT_TIMEOUT;
import static org.openqa.selenium.remote.DriverCommand.SET_TIMEOUT;
import static org.openqa.selenium.remote.DriverCommand.SET_USER_VERIFIED;
Expand Down Expand Up @@ -177,14 +175,6 @@ public AbstractHttpCommandCodec() {
defineCommand(
SET_LOCATION, post(sessionId + "/location")); // Not w3c; used in RemoteLocationContext

// Mobile Spec
defineCommand(
GET_NETWORK_CONNECTION,
get(sessionId + "/network_connection")); // Not w3c; used in RemoteNetworkConnection
defineCommand(
SET_NETWORK_CONNECTION,
post(sessionId + "/network_connection")); // Not w3c; used in RemoteNetworkConnection

// Virtual Authenticator API
String webauthn = sessionId + "/webauthn/authenticator";
String webauthnId = webauthn + "/:authenticatorId";
Expand Down

This file was deleted.

18 changes: 0 additions & 18 deletions java/test/org/openqa/selenium/mobile/BUILD.bazel

This file was deleted.

60 changes: 0 additions & 60 deletions java/test/org/openqa/selenium/mobile/NetworkConnectionTest.java

This file was deleted.

Loading