Forum Xamarin.Android
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

Querying for two text elements in one container

jfpbjfpb USMember ✭✭
edited December 2017 in Xamarin.Android

I am writing tests for an online booking system. Timeslots for the system can be Available, Request, or Unavailable. What I want my test to do is tap the first "Available" timeslot and to return the time as a string, for assertion later on, then select that timeslot and continue. Is there anyway to do this? Currently, I cannot establish a relationship between the 'container', the availability text, and the timslot label text.
As you can see, if a timeslot is unavailable, then there's no text displayed for availability.
When running the repl tree command on this page, I am displayed the following ((for the first two timeslots in the screenshot above) Can't provide a screenshot of the page, it says I've not been around long enough to post pics/links... The 09:00 timeslot is unavailable, 09:30 is available):

   [LabelRenderer] label: "TimeSlotLabelId_Container"
                            [FormsTextView] id: "NoResourceEntry-606",  label: "TimeSlotLabelId",  text: "09:00"
                        [Platform_DefaultRenderer > Platform_DefaultRenderer]
                          [LabelRenderer] label: "TimeSlotLabelId_Container"
                            [FormsTextView] id: "NoResourceEntry-608",  label: "TimeSlotLabelId",  text: "09:30"
                            [FormsTextView] id: "NoResourceEntry-609" text: "Available"
``> > > ``

If I query the "TimeSlotLabelId_Container", then there's nothing that seems to links the times to the availability:

[0] {
        Id => null,
        Description => "md5b60ffeb829f638581ab2bb9b1a7f4f3f.LabelRenderer{14f1b71 V.E...... ........ 0,0-120,65}",
        Rect => {
            Width => 120,
            Height => 65,
            X => 40,
            Y => 842,
            CenterX => 100,
            CenterY => 874
        Label => "TimeSlotLabelId_Container",
        Text => null,
        Class => "md5b60ffeb829f638581ab2bb9b1a7f4f3f.LabelRenderer",
        Enabled => true
Sign In or Register to comment.