This is a migrated thread and some comments may be shown as answers.

Automation ID for DayCells

5 Answers 153 Views
Calendar & Scheduling
This is a migrated thread and some comments may be shown as answers.
Julian
Top achievements
Rank 1
Julian asked on 13 Jun 2016, 11:45 AM

Hey guys,

We are currently automating our Xamarin Forms App with Appium. Xamarin Forms allows us to use Automation ID’s to find elements in our test-cases.
For the Telerik Calendar there is just the possibility to set an automation ID on the calendar itself, but not on the DayCells.
To test our app, we need to set the automation ID for the DayCells to identify the dates in the calendar. At the moment, the ID for every cells seems to be the day of the month. So it can happen that Id’s are available twice in the MonthView. So we can’t use the current approach for our case.
Is there a way to set the automation ID of the DayCells to something like: “Day.Month.Year”?

Best regards

Julian

 

5 Answers, 1 is accepted

Sort by
0
Vladislav
Telerik team
answered on 15 Jun 2016, 08:33 AM
Hello Julian,

Thank you for contacting us.
Currently there is no straightforward/easy way to set automation ID for the DayCells.

However in your particular scenario (automating day cells for a calendar) this can be achieved by some custom logic in your tests handling such scenario (two objects with the same automation ID). The idea is when requesting a particular day first to check the count of objects returned with some particular ID (1 from the attached image). If there is only one - you can safely use it, in case that there are 2 such objects, you can just get the first or the second, depending exact day that you want to get.

I hope that this suggestion is applicable to your scenario.

Regards,
Vladislav
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Adam Hill
Top achievements
Rank 1
answered on 22 Oct 2018, 04:51 PM

What about Events? We cannot see the dots at all in the iOS or Android "DOM" in Appium's UI Browser.

We can see a list of UIViews that correspond to the DayNumber, but there are no children in the UIView for that Day, for any Events that may be visible on the CalendarUI.

 

Thanks.

0
Georgi
Telerik team
answered on 23 Oct 2018, 01:40 PM
Hi Adam,

I am afraid that currently there is no way to set automation ids or see the events in the "DOM". The reason behind this comes from the fact that they are not visual elements in the tree, but rather drawn on the screen.

If you have any other questions or concerns, please don't hesitate to write us.

Regards,
Georgi
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
Adam Hill
Top achievements
Rank 1
answered on 24 Oct 2018, 04:40 PM

Thanks.

Another wrinkle QA has informed me of:

On Android we cannot see DayCells at all, only the Weeks. Thus we cannot click on them in Android tests:

Details:

XamarinForms 2.50.280555

Telerik Common / Input 2018.2.620.2

We test with Appium Studio (v11.8) & have tried looking at the tree on an Android 6.0 device. We have even added "AutomationProperties.IsInAccessibleTree=true" to the CalendarControl. It has helped us in the past with <Listview/> elements being invisible.

 

Any suggestions?

Thanks.

0
Georgi
Telerik team
answered on 25 Oct 2018, 08:12 AM
Hi Adam,

Indeed the DayCells cannot be located and the case here is similar to the one with the events on iOS. In order to boost the performance, the content of the control is a Canvas and all of the elements of the Calendar are just drawings (for example using the drawTextmethod) inside of it.

So as the only visual element here is the Canvas, all of the drawings inside of it (the Calendar elements) cannot be located.

Nevertheless, as we struggle with automation of the calendar internally, the only thing we found useful is to use image comparing verification in order to validate the control state, and as the image would be different every day, we set the Emulator current date to a specific date.

Hope this would help.

Regards,
Georgi
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Calendar & Scheduling
Asked by
Julian
Top achievements
Rank 1
Answers by
Vladislav
Telerik team
Adam Hill
Top achievements
Rank 1
Georgi
Telerik team
Share this question
or