Auto-Complete text suggestion selection in Android

1,764 views
Skip to first unread message

Atishay Shukla

unread,
Jun 11, 2014, 1:06:35 PM6/11/14
to appium-...@googlegroups.com
Hello Friends,

I am stuck in my automation where I have to select a value from the list of suggestions.

In my application I have a recipient section, clicking on which we can type ahead the name we want to choose and based on which it provides us with the list to choose from.

Using appium I am unable to interact with that list and select the desired value.

Please help me get through this issue as I have been trying a lot but couldn't make it. Its urgent for my project and its a blocker situation.

Thanks in advance for the help.

Atishay

Patrick L

unread,
Jun 11, 2014, 1:26:46 PM6/11/14
to appium-...@googlegroups.com
I have had a lot of problems selecting anything in these types of overlays with appium. Don't think its possible as of now if the inspector doesn't see it. I think appium can only inspect and interact with one layer at a time so if the focus is not on the overlays appium doesnt bother to try and see it. Would be great to have support on all layers the device has for the active app.

Atishay Shukla

unread,
Jun 11, 2014, 1:44:00 PM6/11/14
to appium-...@googlegroups.com
Hi Patrick,

Thanks for the reply.

Can you please suggest any work around. I really need to get this working as this is the only way of proceeding further with my app.

Patrick L

unread,
Jun 11, 2014, 1:53:13 PM6/11/14
to appium-...@googlegroups.com
if you were to use the appium inspector can you see the overlay and get its xpath?

can you get the location of the field you are editing? you can then use those coordinates to tap a certain distance away to where your selection is. it would be some guess work until you got it right but i think thats all you can do for now. 

hopefully someone who works on appium could provide some insight on if they could fix this issue for us in the future

bootstrap online

unread,
Jun 11, 2014, 1:56:13 PM6/11/14
to Patrick L, appium-...@googlegroups.com
There needs to be an apk available to reproduce the issue.
> --
> 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.

Atishay Shukla

unread,
Jun 11, 2014, 2:05:44 PM6/11/14
to appium-...@googlegroups.com
I will try your suggestion Patrick..

Thanks for the response..

Atishay Shukla

unread,
Jun 11, 2014, 2:06:58 PM6/11/14
to appium-...@googlegroups.com, pjl...@gmail.com
Hi ,

Could you please explain what apk you need?

Patrick L

unread,
Jun 11, 2014, 2:08:39 PM6/11/14
to appium-...@googlegroups.com, pjl...@gmail.com
I can provide you with our apk or you can download it from the playstore here https://play.google.com/store/apps/details?id=com.groupme.android

Had some trouble with a popup window on sending message attachments. It's not found in the appium inspector but can definitely be interacted with.

Let me know if you need anything else to understand the issue

Another area we have an overlay that might be similar to the original issue is on editing the user name on a newer device that provides suggested words. Dont think you can get access to those.

Last thing i can think of is tap and hold where you get the option to "PASTE" and that doesnt work

Atishay Shukla

unread,
Jun 12, 2014, 12:13:31 AM6/12/14
to appium-...@googlegroups.com, pjl...@gmail.com
Hello,

Please find attached the screen shot of my problem. Let me know if you find a way to select from the list.

Thanks in advance.
Unable to read list.jpg

bootstraponline

unread,
Jun 13, 2014, 2:09:03 PM6/13/14
to appium-...@googlegroups.com, pjl...@gmail.com
I looked into this. It seems that's a custom view so the devs would need to make it accessible. Google has published a bunch of information on how to do this. uiautomator uses the accessibility service so if something isn't showing up in uiautomatorviewer then it can't be automated with uiautomator.

Atishay Shukla

unread,
Jun 13, 2014, 2:16:32 PM6/13/14
to appium-...@googlegroups.com, pjl...@gmail.com
Thanks for the reply.Is there a concrete workaround. Please let me know if any.

I tried to make it possible by hitting the coordinates, but that work around was not accepted. Also in order to do so I need to wait for some time and all i have is to use implicit wait, like driver.manage.timeout.implicitWait  but that does not work.
I have no element to make it wait explicitly i.e wait.until..
 

Do guide me if I am wrong or missing something.

thanks

bootstrap online

unread,
Jun 13, 2014, 2:26:08 PM6/13/14
to Atishay Shukla, appium-...@googlegroups.com, Patrick Losco

Atishay Shukla

unread,
Jun 13, 2014, 2:36:45 PM6/13/14
to appium-...@googlegroups.com, atisha...@gmail.com, pjl...@gmail.com
What I find here is  : Building Accessibility Service. I will surely go through this and figure out if something can be of help.

In the mean while if u find something exact to my problem, do share it with me. Also I have never worked me these accessibility services so may be it will take some time for me to get it to work.

I appreciate your time and help. In case I have more queries i will touch base with you.

Atishay Shukla

unread,
Jun 13, 2014, 2:49:43 PM6/13/14
to appium-...@googlegroups.com, atisha...@gmail.com, pjl...@gmail.com
Hi,

Could you please guide me what exactly to look for her as I am unable to follow much in this. A little insight would be appreciated.


Thanks

bootstrap online

unread,
Jun 13, 2014, 2:53:42 PM6/13/14
to Atishay Shukla, appium-...@googlegroups.com, Patrick Losco
Unfortunately the target audience for that page is Android developers.
It's up to your dev team to follow Android best practices otherwise
automation is difficult.

bootstrap online

unread,
Jun 13, 2014, 3:01:27 PM6/13/14
to appium-...@googlegroups.com
You could always try Selendroid mode. It doesn't have the same
limitations as uiautomator.

On Fri, Jun 13, 2014 at 2:57 PM, Atishay Shukla <atisha...@gmail.com> wrote:
> Oh ok i got it now. I will surely try to convey them this but dnt knw if
> they will be if much assistance to me. Many thanks for sharing this. I hope
> appium comes up with sme solution to this..
>
> On Jun 14, 2014 12:23 AM, "bootstrap online" <ma...@bootstraponline.com>

bootstrap online

unread,
Jun 13, 2014, 6:24:42 PM6/13/14
to appium-...@googlegroups.com
Yes, selendroid supports latest API level. To find the id, use
selendroid inspector.
http://selendroid.io/inspector.html

On Fri, Jun 13, 2014 at 6:19 PM, Atishay Shukla <atisha...@gmail.com> wrote:
> I will try. Can selendroid work with latest api level. I m not too sure
> about it. And what wil be the id of this auto list in case of selendroid.
>
> On Jun 14, 2014 12:31 AM, "bootstrap online" <ma...@bootstraponline.com>
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Appium-discuss" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/appium-discuss/MpXMIJIBRuU/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to

Atishay Shukla

unread,
Jun 18, 2014, 8:16:07 AM6/18/14
to appium-...@googlegroups.com
Hello,

Thanks for the information. I tried using selendroid but the issue is that It has different ways of interacting with the elements.

I already have a lot of things in place which interacts well with uiautomator.

For the issue mentioned by me where i have to select the value from Auto suggestion, i temporary used the coordinates to select the value, but then again it changes from device to device.

Here is the snippet I am using:

public void clickOnSpecifiedCoordinates(){
        JavascriptExecutor js = (JavascriptExecutor) driver;
        HashMap<String, Double> tapObject = new HashMap<String, Double>();
        tapObject.put("x" , 462.0);
        tapObject.put("y", 300.0);
        tapObject.put("duration", 0.1);
        js.executeScript("mobile: tap", tapObject);
        System.out.println("In Specified co");
    }


Please let me know if you guys have any update to make it possible. It will be much much appreciated.

Thanks,
Atishay
Reply all
Reply to author
Forward
0 new messages