开发者

How to get the zoom level of a mapview in Android when writing the test cases using solo in Robotium

I am working on Robotium to perform an automation test an开发者_StackOverflow中文版 Android application. in side the application a map view has to get the zoom levels. Can any one explain how to get the zoom level of a map view by using Solo Object in Robotium tool?


Try something like this:

MapView map = (MapView)solo.getCurrentActivity().findViewById(your.package.name.R.id.google_maps);
int zoom = map.getZoomLevel();

I just tried this on my robotium testcase and it worked. Also, you should try accepting answers, you'll get better/more responses! Good luck

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜