UI automating of Android gallery with Appium

1,103 views
Skip to first unread message

green...@gmail.com

unread,
May 16, 2014, 6:59:04 AM5/16/14
to appium-...@googlegroups.com
Hello!
I have a test scenario, that include interaction with android gallery. There is android.view.View with resource-id com.android.gallery3d:id/gl_root_view. But unfortunately i can't get any identifiers for pictures in this view (by UI Automator Viewer, for example). Is there any workaround for interracting with pictures in android gallery with appium?
Thanks for advance.

Sangeetha Srinivasan

unread,
May 27, 2014, 4:54:11 PM5/27/14
to appium-...@googlegroups.com
Currently we are using the device coordinates to access the albums and pictures, which is really a pain. I am looking forward to a nicer way as well

bootstrap online

unread,
May 27, 2014, 4:55:53 PM5/27/14
to Sangeetha Srinivasan, appium-...@googlegroups.com
The solution is to have the developers attach content descriptions to
the albums and pictures.
> --
> 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.

Andrew Dinh

unread,
May 29, 2014, 1:53:19 PM5/29/14
to appium-...@googlegroups.com
Uiautomator cannot select or see the thumbnails in Gallery.  So what you will have to do is determine the orientation of the device (portrait or landscape), then calculate the center coordinates of the thumbnail to be selected/tapped (for instance thumbnail 3 out of 7 thumbnails).  Then tap or long-tap on the coordinates.

Sangeetha Srinivasan

unread,
May 29, 2014, 2:25:32 PM5/29/14
to Andrew Dinh, appium-...@googlegroups.com
@bootstraponline , these are already existing albums / pics in the device, the app is not creating them

@AndrewDinh for each device model the gallery arrangement of albums and pictures are different, so the calculations should be very device specific, which is not cool! 


On Thu, May 29, 2014 at 1:53 PM, Andrew Dinh <trieu...@gmail.com> wrote:
Uiautomator cannot select or see the thumbnails in Gallery.  So what you will have to do is determine the orientation of the device (portrait or landscape), then calculate the center coordinates of the thumbnail to be selected/tapped (for instance thumbnail 3 out of 7 thumbnails).  Then tap or long-tap on the coordinates.

--

ekjyot kaur

unread,
Aug 27, 2014, 12:09:33 PM8/27/14
to appium-...@googlegroups.com


Hi I am also facing the same issue. Sid u find any solution. As i Am not able to tap the images using coordinates and tap method of touchaction class.

Waiting for your positive reply.
Thanks
Reply all
Reply to author
Forward
0 new messages