Пример #1
0
 private void SendMessage(string to, string subject, string message)
 {
     EnterPage.ClickCompose();
     ComposeMailPage.InputToField(to);
     ComposeMailPage.InputSubjectField(subject);
     ComposeMailPage.InputMessageField(message);
     ComposeMailPage.ClickSendButton();
 }
Пример #2
0
        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();
        }
Пример #3
0
        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();
        }
Пример #4
0
        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");
        }