private void SendMessage(string to, string subject, string message) { EnterPage.ClickCompose(); ComposeMailPage.InputToField(to); ComposeMailPage.InputSubjectField(subject); ComposeMailPage.InputMessageField(message); ComposeMailPage.ClickSendButton(); }
public void TestMethod2() { EnterPage.ClickCompose(); ComposeMailPage.InputToField(TestConfiguration.Email); ComposeMailPage.InputSubjectField(TestConfiguration.MailSubject); ComposeMailPage.InputMessageField(TestConfiguration.Message); ComposeMailPage.ClickCloseButton(); EnterPage.GoToDraftFolder(); DraftMailPage.OpenMail(); //Assert.AreEqual(ComposeMailPage.GetSubjectText(), TestConfiguration.MailSubject, "Wrong subject"); Assert.AreEqual(ComposeMailPage.GetMessageText(), TestConfiguration.Message, "Wrong message"); ComposeMailPage.ClickSendButton(); }
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"); }