Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Appium Maps - Location Testing on Android

1,052 views
Skip to first unread message

Bobby Jap

unread,
Sep 2, 2014, 5:56:41 PM9/2/14
to appium-...@googlegroups.com
I am currently trying to test an app on the android that is built around location functions. I am running into an issue with the map and location specifically.

The test I am writing is to load the activity with a GoogleMap view, set a location of my choice, and verify that this location is show on the map. The code is programmed to react to location changes.

Problem one: I cannot set location on a real device. I may have read online that it cannot be done on a device that is not rooted and would prefer not to do this.

Problem two: When I run the app on the emulator, the map does not show and I see a gray square in its place. The map does show on a real device however. The app doesn't crash when I try to set location but I cannot detect any change with no map to look at.

Could I have confirmation that problem one cannot be resolved on an unrooted device, and a solution to why problem two is an issue?

Satyajit Malugu

unread,
Sep 2, 2014, 7:16:19 PM9/2/14
to Bobby Jap, appium-...@googlegroups.com
One: This should be possible with appium set_location: on emulator as well as real device.
Two: This used to happen with my last android app but I was never able to figure it out.


--
http://appium.io
---
You received this message because you are subscribed to the Google Groups "Appium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to appium-discus...@googlegroups.com.
Visit this group at http://groups.google.com/group/appium-discuss.
For more options, visit https://groups.google.com/d/optout.

Isaac Murchie

unread,
Sep 3, 2014, 12:23:02 AM9/3/14
to Satyajit Malugu, Bobby Jap, appium-...@googlegroups.com
At the moment Appium's setLocation strategy involves telnetting into the device. This doesn't work on a real device unless it is rooted and has a telnet daemon running. I think a fix is in the milestones. There are ways to mock locations using third party tools. Check the issue on github. 
Reply all
Reply to author
Forward
0 new messages