Select WhatsApp Chat By ListView Entry Number Instead Of ListView Entry Text

196 views
Skip to first unread message

Cartoon Turbine

unread,
Dec 4, 2021, 7:18:45 AM12/4/21
to Automate
Hello Group Members,

I'm trying to find out a way in order to select fifth person in the search results list on WhatsApp after a name is given in the search box.

For example, I have saved ten different persons with same name "John" in my phone Contacts. Instead of sending all ten a greeting message, my flow needs to select the fifth person in the search results list when searched with name "John" for it.

The below one would be enough for my flow to select the first entry in the list with name "John".

UI Element Class:
android.widget.TextView

UI Element Text:
"John"

UI Element ID:
com.whatsapp.w4b:id/contactpicker_row_name

Can anybody please inform here the way how to select the list item by its position number? If it is not possible in WhatsApp, can anybody inform here a different logic to do this without knowing the TextView list's entry position numbers.


Henrik "The Developer" Lindqvist

unread,
Dec 4, 2021, 11:02:55 AM12/4/21
to Automate
If you update Automate to were the Interact block support XPath, then it would be something like:
(.//android.widget.TextView[@android:id='@com.whatsapp.w4b:id/contactpicker_row_name' and @android:text='John'])[5]
Reply all
Reply to author
Forward
0 new messages