From 5806401193249573f1f3ac91f94407a280f94544 Mon Sep 17 00:00:00 2001 From: Andrei Solntsev Date: Wed, 13 Aug 2025 00:50:20 +0300 Subject: [PATCH 1/4] build(deps): bump Selenium from 4.34.0 to 4.35.0 --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index f53e0d155..26ac1907c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ org.gradle.daemon=true -selenium.version=4.34.0 +selenium.version=4.35.0 # Please increment the value in a release appiumClient.version=9.5.0 From 31137eb34caa6b916a7df0cea3a6383ca85b98bd Mon Sep 17 00:00:00 2001 From: Andrei Solntsev Date: Wed, 13 Aug 2025 00:51:25 +0300 Subject: [PATCH 2/4] feat: remove all Location-related methods classes `Location` and `LocationContext` have been removed in Selenium 4.35.0 --- .../io/appium/java_client/AppiumDriver.java | 5 --- .../java_client/android/AndroidDriver.java | 15 ------- .../io/appium/java_client/ios/IOSDriver.java | 15 ------- .../java_client/remote/SupportsLocation.java | 44 ++----------------- 4 files changed, 4 insertions(+), 75 deletions(-) diff --git a/src/main/java/io/appium/java_client/AppiumDriver.java b/src/main/java/io/appium/java_client/AppiumDriver.java index 4c641fd2b..1daf7013e 100644 --- a/src/main/java/io/appium/java_client/AppiumDriver.java +++ b/src/main/java/io/appium/java_client/AppiumDriver.java @@ -44,7 +44,6 @@ import org.openqa.selenium.remote.RemoteWebDriver; import org.openqa.selenium.remote.Response; import org.openqa.selenium.remote.codec.w3c.W3CHttpResponseCodec; -import org.openqa.selenium.remote.html5.RemoteLocationContext; import org.openqa.selenium.remote.http.HttpClient; import org.openqa.selenium.remote.http.HttpMethod; @@ -81,8 +80,6 @@ public class AppiumDriver extends RemoteWebDriver implements // frequently used command parameters @Getter private final URL remoteAddress; - @Deprecated(forRemoval = true) - protected final RemoteLocationContext locationContext; private final ExecuteMethod executeMethod; private final Set absentExtensionNames = new HashSet<>(); private URI biDiUri; @@ -100,7 +97,6 @@ public class AppiumDriver extends RemoteWebDriver implements public AppiumDriver(HttpCommandExecutor executor, Capabilities capabilities) { super(executor, capabilities); this.executeMethod = new AppiumExecutionMethod(this); - locationContext = new RemoteLocationContext(executeMethod); super.setErrorHandler(ERROR_HANDLER); this.remoteAddress = executor.getAddressOfRemoteServer(); } @@ -176,7 +172,6 @@ public AppiumDriver(URL remoteSessionAddress, String platformName, String automa executor.setResponseCodec(new W3CHttpResponseCodec()); setCommandExecutor(executor); this.executeMethod = new AppiumExecutionMethod(this); - this.locationContext = new RemoteLocationContext(executeMethod); super.setErrorHandler(ERROR_HANDLER); this.remoteAddress = executor.getAddressOfRemoteServer(); diff --git a/src/main/java/io/appium/java_client/android/AndroidDriver.java b/src/main/java/io/appium/java_client/android/AndroidDriver.java index dfd9a879a..aa1d30159 100644 --- a/src/main/java/io/appium/java_client/android/AndroidDriver.java +++ b/src/main/java/io/appium/java_client/android/AndroidDriver.java @@ -43,7 +43,6 @@ import org.openqa.selenium.Capabilities; import org.openqa.selenium.Platform; import org.openqa.selenium.remote.HttpCommandExecutor; -import org.openqa.selenium.remote.html5.RemoteLocationContext; import org.openqa.selenium.remote.http.ClientConfig; import org.openqa.selenium.remote.http.HttpClient; @@ -251,20 +250,6 @@ public AndroidBatteryInfo getBatteryInfo() { return new AndroidBatteryInfo(CommandExecutionHelper.executeScript(this, "mobile: batteryInfo")); } - /** - * Provides the location context. - * - * @return instance of {@link RemoteLocationContext} - * @deprecated This method, {@link org.openqa.selenium.html5.LocationContext} and {@link RemoteLocationContext} - * interface are deprecated, use {@link #getLocation()} and - * {@link #setLocation(io.appium.java_client.Location)} instead. - */ - @Override - @Deprecated(forRemoval = true) - public RemoteLocationContext getLocationContext() { - return locationContext; - } - @Override public synchronized StringWebSocketClient getLogcatClient() { if (logcatClient == null) { diff --git a/src/main/java/io/appium/java_client/ios/IOSDriver.java b/src/main/java/io/appium/java_client/ios/IOSDriver.java index 6cc48469e..0fd5cbf20 100644 --- a/src/main/java/io/appium/java_client/ios/IOSDriver.java +++ b/src/main/java/io/appium/java_client/ios/IOSDriver.java @@ -44,7 +44,6 @@ import org.openqa.selenium.remote.DriverCommand; import org.openqa.selenium.remote.HttpCommandExecutor; import org.openqa.selenium.remote.Response; -import org.openqa.selenium.remote.html5.RemoteLocationContext; import org.openqa.selenium.remote.http.ClientConfig; import org.openqa.selenium.remote.http.HttpClient; @@ -279,20 +278,6 @@ class IOSAlert implements Alert { } - /** - * Provides the location context. - * - * @return instance of {@link RemoteLocationContext} - * @deprecated This method, {@link org.openqa.selenium.html5.LocationContext} and {@link RemoteLocationContext} - * interface are deprecated, use {@link #getLocation()} and - * {@link #setLocation(io.appium.java_client.Location)} instead. - */ - @Override - @Deprecated(forRemoval = true) - public RemoteLocationContext getLocationContext() { - return locationContext; - } - @Override public synchronized StringWebSocketClient getSyslogClient() { if (syslogClient == null) { diff --git a/src/main/java/io/appium/java_client/remote/SupportsLocation.java b/src/main/java/io/appium/java_client/remote/SupportsLocation.java index 91e12f0fa..c19dcc96c 100644 --- a/src/main/java/io/appium/java_client/remote/SupportsLocation.java +++ b/src/main/java/io/appium/java_client/remote/SupportsLocation.java @@ -18,40 +18,16 @@ import io.appium.java_client.CommandExecutionHelper; import io.appium.java_client.ExecutesMethod; +import io.appium.java_client.Location; import io.appium.java_client.MobileCommand; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebDriverException; -import org.openqa.selenium.html5.Location; -import org.openqa.selenium.html5.LocationContext; -import org.openqa.selenium.remote.html5.RemoteLocationContext; import java.util.HashMap; import java.util.Map; import java.util.Optional; -public interface SupportsLocation extends WebDriver, ExecutesMethod, LocationContext { - - /** - * Provides the location context. - * - * @return instance of {@link RemoteLocationContext} - * @deprecated This method, {@link LocationContext} and {@link RemoteLocationContext} interface are deprecated, use - * {@link #getLocation()} and {@link #setLocation(io.appium.java_client.Location)} instead. - */ - @Deprecated(forRemoval = true) - RemoteLocationContext getLocationContext(); - - /** - * Gets the current device's geolocation coordinates. - * - * @return A {@link Location} containing the location information. Returns null if the location is not available - * @deprecated This method and whole {@link LocationContext} interface are deprecated, use {@link #getLocation()} - * instead. - */ - @Deprecated(forRemoval = true) - default Location location() { - return getLocationContext().location(); - } +public interface SupportsLocation extends WebDriver, ExecutesMethod { /** * Gets the current device's geolocation coordinates. @@ -59,9 +35,9 @@ default Location location() { * @return A {@link Location} containing the location information. Throws {@link WebDriverException} if the * location is not available. */ - default io.appium.java_client.Location getLocation() { + default Location getLocation() { Map result = CommandExecutionHelper.execute(this, MobileCommand.GET_LOCATION); - return new io.appium.java_client.Location( + return new Location( result.get("latitude").doubleValue(), result.get("longitude").doubleValue(), Optional.ofNullable(result.get("altitude")).map(Number::doubleValue).orElse(null) @@ -72,20 +48,8 @@ default io.appium.java_client.Location getLocation() { * Sets the current device's geolocation coordinates. * * @param location A {@link Location} containing the new location information. - * @deprecated This method and whole {@link LocationContext} interface are deprecated, use - * {@link #setLocation(io.appium.java_client.Location)} instead. */ - @Deprecated(forRemoval = true) default void setLocation(Location location) { - getLocationContext().setLocation(location); - } - - /** - * Sets the current device's geolocation coordinates. - * - * @param location A {@link Location} containing the new location information. - */ - default void setLocation(io.appium.java_client.Location location) { var locationParameters = new HashMap(); locationParameters.put("latitude", location.getLatitude()); locationParameters.put("longitude", location.getLongitude()); From b01f7f84b58edde5cbdc4a6bfba01969d889900d Mon Sep 17 00:00:00 2001 From: Andrei Solntsev Date: Wed, 13 Aug 2025 10:25:47 +0300 Subject: [PATCH 3/4] add Selenium 4.35.0 to compatibility matrix --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0d78b2bae..0957c49d2 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,7 @@ dependencies { ### Compatibility Matrix Appium Java Client | Selenium client ----------------------------------------------------------------------------------------------------|----------------------------- +`10.0.0` | `4.35.0` `9.5.0` | `4.34.0` `9.4.0` | `4.26.0`, `4.27.0`, `4.28.0`, `4.28.1`, `4.29.0`, `4.30.0`, `4.31.0`, `4.32.0`, `4.33.0` `9.2.1`(known issues: appium/java-client#2145, appium/java-client#2146), `9.2.2`, `9.2.3`, `9.3.0` | `4.19.0`, `4.19.1`, `4.20.0`, `4.21.0`, `4.22.0`, `4.23.0`, `4.23.1`, `4.24.0`, `4.25.0`, `4.26.0`, `4.27.0` From 8521aaf43269a131a1f5e1474739850457c12f5c Mon Sep 17 00:00:00 2001 From: Andrei Solntsev Date: Wed, 13 Aug 2025 00:51:44 +0300 Subject: [PATCH 4/4] build: bump Gradle from 8.9 to 8.14.3 --- build.gradle | 2 +- gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index be70778ff..1cc9fdc6d 100644 --- a/build.gradle +++ b/build.gradle @@ -188,7 +188,7 @@ jreleaser { } wrapper { - gradleVersion = '8.14' + gradleVersion = '8.14.3' distributionType = Wrapper.DistributionType.ALL } diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index dedd5d1e6..7705927e9 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.14.3-all.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME