Select an app from listed play store apps | Appium Forum
C
Chandrakant Sontakke Posted on 20/10/2020

I want to select particular app from playstore but not able to get the xpath for the selection.

Steps:

Open play store

Select search 

Enter text 'Candy Crush'

Hit Enter

This list many candy crush apps in the list.

Now I want to select Candy Crush friends saga which is 4th in the list of displayed apps.

All apps have same attributes except content-desc attibute.

However, content-desc attibute is very long (multi line) and whenver I tried using it in xpath, it always fail.

Is there any way to

1) Use content-desc in xpath when it is very long or in multiple lines

2) If I want to use some part of content-desc (may be using contains), how to use it?

Please see the screen image attached using UI automator.


A
Ashish Thakur Replied on 22/10/2020

You can build the locator based on the name as well 'candy crush'

Did you try that?


C
Chandrakant Sontakke Replied on 22/10/2020

I built a locator using other attributes since name attribute is not available. However it is not working. Is it possible to give specific example or can you please create and show me as I tried multiple options to locate specific application selection for installation.