Skip to content
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`
Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ jreleaser {
}

wrapper {
gradleVersion = '8.14'
gradleVersion = '8.14.3'
distributionType = Wrapper.DistributionType.ALL
}

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 0 additions & 5 deletions src/main/java/io/appium/java_client/AppiumDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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<String> absentExtensionNames = new HashSet<>();
private URI biDiUri;
Expand All @@ -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();
}
Expand Down Expand Up @@ -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();

Expand Down
15 changes: 0 additions & 15 deletions src/main/java/io/appium/java_client/android/AndroidDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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) {
Expand Down
15 changes: 0 additions & 15 deletions src/main/java/io/appium/java_client/ios/IOSDriver.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,50 +18,26 @@

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.
*
* @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<String, Number> 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)
Expand All @@ -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<String, Object>();
locationParameters.put("latitude", location.getLatitude());
locationParameters.put("longitude", location.getLongitude());
Expand Down
Loading