public void MailServiceCorrectWork() { // Creating new message subject = "Test mail, " + DateTime.Now; MailPage.ClickComposeLink(); EditorMailPage.FillMailFields(MailTo, subject, Message); // Saving to Drafts folder EditorMailPage.SaveMailToDrafts(); MailPage.OpenFolder(MailFolders.Drafts); ListMailPage.VerifyExistenceOfTheMailInFolder(MailTo, subject, true); // Verifying content of the draft message ListMailPage.OpenMessage(MailTo, subject); EditorMailPage.VerifyMessageContent(MailTo, subject, Message); // Sending message and verifying its moving from Drafts to Sent folder EditorMailPage.ClickSendMessageButton(); MailPage.OpenFolder(MailFolders.Drafts); ListMailPage.VerifyExistenceOfTheMailInFolder(MailTo, subject, false); MailPage.OpenFolder(MailFolders.Sent); ListMailPage.VerifyExistenceOfTheMailInFolder(MailTo, subject, true); Console.WriteLine("VerifyMailSent: OK"); }
public void FillMailFields(string mailTo, string subject, string message) { EditorMailPage = EditorMailPage.FillMailFields(mailTo, subject, message); }