Selecting one of multiple matching elements

CHarrisCHarris USMember ✭✭
edited May 2017 in Xamarin Test Cloud

I have a page that contains two buttons with matching text. I would like to choose the second one but it seems like the first is always chosen by default. Below is the relevant code and the output.

app.WaitForElement("ABCD", null, new TimeSpan(0, 0, 15), null, null);
app.Tap("ABCD");

Waiting for element matching Marked("ABCD").
Using first element (2 total) matching Marked("ABCD").
Tapping coordinates [ 540, 466 ].

How do I specify that I would like to tap the second element that is named ABCD?

Best Answer

Answers

  • CHarrisCHarris USMember ✭✭

    That worked perfectly! Thank you Anthony!

Sign In or Register to comment.