2121import io .appium .java_client .MobileCommand ;
2222import org .openqa .selenium .WebDriver ;
2323import org .openqa .selenium .WebDriverException ;
24- import org .openqa .selenium .html5 .Location ;
25- import org .openqa .selenium .html5 .LocationContext ;
26- import org .openqa .selenium .remote .html5 .RemoteLocationContext ;
2724
2825import java .util .HashMap ;
2926import java .util .Map ;
3027import java .util .Optional ;
3128
32- public interface SupportsLocation extends WebDriver , ExecutesMethod , LocationContext {
33-
34- /**
35- * Provides the location context.
36- *
37- * @return instance of {@link RemoteLocationContext}
38- * @deprecated This method, {@link LocationContext} and {@link RemoteLocationContext} interface are deprecated, use
39- * {@link #getLocation()} and {@link #setLocation(io.appium.java_client.Location)} instead.
40- */
41- @ Deprecated (forRemoval = true )
42- RemoteLocationContext getLocationContext ();
43-
44- /**
45- * Gets the current device's geolocation coordinates.
46- *
47- * @return A {@link Location} containing the location information. Returns null if the location is not available
48- * @deprecated This method and whole {@link LocationContext} interface are deprecated, use {@link #getLocation()}
49- * instead.
50- */
51- @ Deprecated (forRemoval = true )
52- default Location location () {
53- return getLocationContext ().location ();
54- }
29+ public interface SupportsLocation extends WebDriver , ExecutesMethod {
5530
5631 /**
5732 * Gets the current device's geolocation coordinates.
5833 *
59- * @return A {@link Location} containing the location information. Throws {@link WebDriverException} if the
34+ * @return A {@link io.appium.java_client. Location} containing the location information. Throws {@link WebDriverException} if the
6035 * location is not available.
6136 */
6237 default io .appium .java_client .Location getLocation () {
@@ -71,19 +46,7 @@ default io.appium.java_client.Location getLocation() {
7146 /**
7247 * Sets the current device's geolocation coordinates.
7348 *
74- * @param location A {@link Location} containing the new location information.
75- * @deprecated This method and whole {@link LocationContext} interface are deprecated, use
76- * {@link #setLocation(io.appium.java_client.Location)} instead.
77- */
78- @ Deprecated (forRemoval = true )
79- default void setLocation (Location location ) {
80- getLocationContext ().setLocation (location );
81- }
82-
83- /**
84- * Sets the current device's geolocation coordinates.
85- *
86- * @param location A {@link Location} containing the new location information.
49+ * @param location A {@link io.appium.java_client.Location} containing the new location information.
8750 */
8851 default void setLocation (io .appium .java_client .Location location ) {
8952 var locationParameters = new HashMap <String , Object >();
0 commit comments