Automation ID for DayCells

2 posts, 0 answers
  1. Julian
    Julian avatar
    6 posts
    Member since:
    Aug 2015

    Posted 13 Jun Link to this post

    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



  2. Vladislav
    Vladislav avatar
    274 posts

    Posted 15 Jun Link to this post

    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.

    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
  3. DevCraft banner
Back to Top