public void TestAlert() { AwesomeProjectModel model = new AwesomeProjectModel(this.app); model.TapTestButton(); AwesomePopup popup = new AwesomePopup(this.app); string titleText = popup.GetTitle(); Assert.AreEqual("Test Title", titleText, "The title of the alert box did not have the expected value."); string messageText = popup.GetMessage(); Assert.AreEqual("Test alert message", messageText, "The message in the alert box did not have the expected value."); popup.TapOK(); }
public void TestAlertWithScreenshots() { this.app.Screenshot("Launched"); AwesomeProjectModel model = new AwesomeProjectModel(this.app); model.TapTestButton(); this.app.Screenshot("Test button tapped"); AwesomePopup popup = new AwesomePopup(this.app); string titleText = popup.GetTitle(); this.app.Screenshot("Popup opened"); Assert.AreEqual("Test Title", titleText, "The title of the alert box did not have the expected value."); string messageText = popup.GetMessage(); Assert.AreEqual("Test alert message", messageText, "The message in the alert box did not have the expected value."); popup.TapOK(); this.app.Screenshot("Popup OK button clicked"); }