Querying on parts of text?

JonasRembrattJonasRembratt SEUniversity ✭✭✭

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.