public async Task TestMethod1() { EnterPage.ClickCompose(); ComposeMailPage.InputToField(TestConfiguration.Email); ComposeMailPage.InputSubjectField(TestConfiguration.MailSubject); ComposeMailPage.InputMessageField(TestConfiguration.Message); ComposeMailPage.ClickSendButton(); EnterPage.GoToSendFolder(); SentMailPage.OpenMail(); Assert.AreEqual(OpenedMailPage.GetSubjectText(), TestConfiguration.MailSubject, "Wrong subject"); Assert.AreEqual(OpenedMailPage.GetMessageText(), TestConfiguration.Message, "Wrong message"); OpenedMailPage.DeleteMail(); }
public void TestMethod4() { EnterPage.ClickCompose(); ComposeMailPage.InputToField(TestConfiguration.IncorrectEmail); ComposeMailPage.InputSubjectField(TestConfiguration.MailSubject); ComposeMailPage.InputMessageField(TestConfiguration.Message); ComposeMailPage.ClickSendButton(); Assert.AreEqual(ComposeMailPage.GetErrorMessageHeader(), TestConfiguration.ErrorMessageHeader, "Wrong error message header"); ComposeMailPage.CloseError(); ComposeMailPage.EnableToField(); ComposeMailPage.ClickDeleteWrongEmailButton(); ComposeMailPage.InputToField(TestConfiguration.IncorrectEmail); EnterPage.GoToSendFolder(); SentMailPage.OpenMail(); //Assert.AreEqual(OpenedMailPage.GetSubjectText(), TestConfiguration.MailSubject, "Wrong subject"); Assert.AreEqual(OpenedMailPage.GetMessageText(), TestConfiguration.Message, "Wrong message"); }