Any suggestions please how to achieve.
Any suggestions please how to achieve.
google maps is view inside your application?
The view is clustered view.
Assume Distributor A has 10 customers.
As soon as Distributor logged into application, he can able to see the all active customer’s locations in map where they are exactly.
Currently in cluster view, map showing 10 distributor(number(10) depends on active status of distributor) at one point as they are very nearer to each other. So if zoom in distributor can able to see the individual customer location point where he is exactly.
So now i have to automate below scenario:
1.After logged in need to get how many active customers showing in MAP.
Issue : In UI it is showing view like 4 RET or 2 RET, but when i spy using uiautomatorview i can able to spy the view but unable to get the number like 4 RET or 2 RET.
really do not want to start again with image recognition (i did it in previous project).
suggest first to try ask developers to add “title” or “snippet” value to markers.
when you tap on marker does any text appears?
So do you see a child “View” under the “Google Maps” View for each of your markers there? If so, ask your devs to fill out the “text” or “content-desc” for each with the text you need to retrieve. I had to ask my devs to do the same thing, and it makes automating so much more possible when they cooperate like that!
Thanks for the reply Aleksei. I will ask the developers to help on this.
Yes text is appearing like tool tip. In the above snap shot, if I click on any image it will display the respective person role(Dstrirbutor/Retailer/Customer) like tool tip. But that text also I am not able to spy using UIAutomatorview.
One more issue.
If I zoom in, cluster will become as individual markers based on some criteria. So in this Zoom in process few markers will not be visible on mobile screen until we move the map. In that case how to know in which direction ma need to move to locate other markers.
Or is there any way to find out the all markers which are present in map but not on mobile UI without moving the map.
if they all on screen you can get size of views under google map view otherwise move only
As you said once i get the size, i am double clicking on cluster in MAP to Zoom in, to see individual items. So in this process Cluster will change over to individual Markers and few are showing in mobile UI and few are moving from mobile UI view. So if we move the map (either left/right/up/down) then only we can able to see the other items. So how to know in which direction MAP should move to see the items after ZOOM in.
Is there any way to get the all views present on MAP, even though not able to see mobile UI.
no. Android shows only what is on screen.
Is there any workaround or trail and error methods to achieve that
maybe you can ask dev to add value to some element on screen for automation as number of found distributors
Like was mentioned, on Android, Appium only knows about what is on screen at that time. So your test case will have to know which way to scroll based on your test data and the actions you are telling it to perform.
On iOS, I know Appium can getPageSource() for things that are off screen for the app I test.
Hi @Brian_Watson, Thanks for the info.
Is there any way to get current marker location where exactly on MAP.
Can you use the coordinates that are displayed above in your screenshot?
My scenario is:
Dimension size = Global.mDriver.manage().window().getSize();
Using the above code, i can able to tap on the object. But it is not working if pan the map or device resolution is changed.
Another problem is: Unable to inspect the features(objects) which are having on the map.
Could you please help with the solution?
Here’s some useful info on how to perform gestures: https://appiumpro.com/editions/67
Thanks for the help,
I will go through the above info and try to make it work. And i will let you know the outcome.