Not able to get the ID or XPath of the element YearMonth on the Date Calendar | Appium Forum
A
Ash Posted on 06/07/2019

Hi Ashish,

 

I am currently going through Module 8 of the Appium Series(Android). In the video, the app(Fast Scheduler) that has been used is no longer available on Google Play Store. I downloaded similar multiple apps from Playstore like Run My Life, CatchUp etc. When trying to implement the logic to select a date using Next and Previous month arrows, i am not able to get the ID or XPath of the element MonthYear(i.e the id or xpath to get the attribute text of July 2019) using UI Automator. When i hover over this element, it gets highlighted over the entire DOM, and even if I try to traverse through this element via DOM, i am not able to locate this element at all. Please find the screenshot attached for reference.

 

Thanks

Ashmeet


A
aditya Replied on 07/07/2019

Hi 

Thanks for writing to us.

The app we have incorporated takes native android calendar and the apps you are talking about takes in consisderation of third party apps.

kindly try to get xpath of your app through Appium in build ui element finder


A
Ash Replied on 07/07/2019

Hi Aditya,

I mentioned in my previous comment that this particular element can not be traversed through DOM as well(no XPath or ID). The in built UI finder is not locating this element at all. 

Ashmeet


A
aditya Replied on 09/07/2019

Hi ashmeet

As discussed we can use dynamic xpath to retrieve elements. Dynamic xpath is combination of classname and text