File tree Expand file tree Collapse file tree 3 files changed +5
-5
lines changed
main/java/io/appium/java_client/remote
test/java/io/appium/java_client Expand file tree Collapse file tree 3 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,6 @@ default void setLocation(io.appium.java_client.Location location) {
90
90
locationParameters .put ("latitude" , location .getLatitude ());
91
91
locationParameters .put ("longitude" , location .getLongitude ());
92
92
Optional .ofNullable (location .getAltitude ()).ifPresent (altitude -> locationParameters .put ("altitude" , altitude ));
93
- execute (MobileCommand .SET_LOCATION , Map .of ("location" , locationParameters ));
93
+ execute (MobileCommand .SET_LOCATION , Map .of ("location" , locationParameters . build () ));
94
94
}
95
95
}
Original file line number Diff line number Diff line change 16
16
17
17
package io .appium .java_client .android ;
18
18
19
+ import io .appium .java_client .Location ;
19
20
import io .appium .java_client .appmanagement .ApplicationState ;
20
21
import org .apache .commons .io .FileUtils ;
21
22
import org .hamcrest .Matchers ;
22
23
import org .junit .jupiter .api .Test ;
23
24
import org .openqa .selenium .ScreenOrientation ;
24
- import org .openqa .selenium .html5 .Location ;
25
25
26
26
import java .io .File ;
27
27
import java .time .Duration ;
@@ -192,7 +192,7 @@ public void toggleLocationServicesTest() {
192
192
193
193
@ Test
194
194
public void geolocationTest () {
195
- Location location = new Location (45 , 45 , 100 );
195
+ Location location = new Location (45 , 45 , 100.0 );
196
196
driver .setLocation (location );
197
197
}
198
198
Original file line number Diff line number Diff line change 16
16
17
17
package io .appium .java_client .ios ;
18
18
19
+ import io .appium .java_client .Location ;
19
20
import io .appium .java_client .appmanagement .ApplicationState ;
20
21
import org .junit .jupiter .api .BeforeEach ;
21
22
import org .junit .jupiter .api .Disabled ;
22
23
import org .junit .jupiter .api .Test ;
23
24
import org .openqa .selenium .By ;
24
25
import org .openqa .selenium .ScreenOrientation ;
25
26
import org .openqa .selenium .WebElement ;
26
- import org .openqa .selenium .html5 .Location ;
27
27
import org .openqa .selenium .remote .RemoteWebElement ;
28
28
import org .openqa .selenium .remote .Response ;
29
29
import org .openqa .selenium .remote .http .HttpMethod ;
@@ -88,7 +88,7 @@ public void getDeviceTimeTest() {
88
88
89
89
@ Disabled
90
90
@ Test public void geolocationTest () {
91
- Location location = new Location (45 , 45 , 100 );
91
+ Location location = new Location (45 , 45 , 100.0 );
92
92
try {
93
93
driver .setLocation (location );
94
94
} catch (Exception e ) {
You can’t perform that action at this time.
0 commit comments