简体   繁体   English

如何使用appium在Android应用程序Google地图中设置位置

[英]How to set Location in android app Google maps using appium

I am testing google map for localization testing. 我正在测试google map进行本地化测试。 I have to set location of except from my current location. 我必须设置当前位置以外的位置。 But it is taking my current location. 但这是我当前的位置。

Sample Code: 样例代码:

 Location location = new Location(77.59974003, 12.91024781, 909);
 driver.setLocation(location);

Try using the code which you have written for seting the location before the map is displayed. 在显示地图之前,请尝试使用编写的用于设置位置的代码。

Location location = new Location(77.59974003, 12.91024781, 909);
driver.setLocation(location);

This will set the driver location before the map is displayed on the screen. 这将在屏幕上显示地图之前设置驾驶员位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM