Forum Xamarin Test Cloud (Read Only)

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

Querying on parts of text?

We're still learning CI and UI testing over here and we've run into a few sticky ones.
What happens is that when tere is a later version available HockeyApp pops a dialog notifying the user of the fact. This (modal) dialog then blocks the rest of the UI test.

Now, I do realize this is more about how and what we test (branching strategies) but this was an excellent opportunity to try and deal with a secondary flow so I wanted to experiment to see if we could dynamically react to this (by tapping the dialog's "Ignore" option).
To do that I assume I need to wait for the dialog, using app.WaitForElement() and just move on if it doesn't appear within a reasonable timeout? The problem is to identify the dialog. The dialog text always starts the same but will vary with different versions so using "Marked()" or "Text()" doesn't cut it. Are there other, more flexible, ways to express criteria? I'm thinking the equiavalent to ...

var s = element.GetMarked();
return s.StartsWith("some text", StringComparison.OrdinalIgnoreCase);

Tagged:
Sign In or Register to comment.