Handling Pop-ups with Xamarin.UITest

Chris.3704Chris.3704 USUniversity ✭✭

Hi,

I would like to find out how to work with pop-ups and Xamarin.UITest, for example:

  • How to check if a pop-up is displayed?
  • What text is shown on a popup?
  • How to interact with popup buttons?

I've seen a couple of posts about this topics but no answers yet.

Thanks,

Chris

Best Answer

Answers

  • JohnMillerJohnMiller USForum Administrator, Xamarin Team Xamurai

    @Chris.3704,

    Could you post a screenshot of a "pop-up"? I am not sure which type of UI you are referring to.

  • Chris.3704Chris.3704 USUniversity ✭✭

    Hi John,

    sure, so I'm creating them in Xamarin.Forms, e.g.
    App.Current.MainPage.DisplayAlert(@Create Form Error, DownloadWarning, "OK");

    So on the native layer they boil down to:
    Android:
    AlertDialog.Builder

    iOS:
    UIAlertView

  • Chris.3704Chris.3704 USUniversity ✭✭

    Awesome! Thanks so much, Matthew.

  • SajidSidiSajidSidi USUniversity ✭✭

    Nice Solution, But I need to get message texts, For example in my case Popup contains "successful" word in one of the message, now i want to print message texts only when perticular message get displayed. at that time how to compare particular word? is there anything similar to '%Like%' ??

Sign In or Register to comment.