static void Main(string[] args) { LoginPageSteps loginPage = new LoginPageSteps(); LogoutPageSteps logoutPage = new LogoutPageSteps(); MainPageSteps mainPage = new MainPageSteps(); ThemesPageSteps themePage = new ThemesPageSteps(); SettingPageSteps settPage = new SettingPageSteps(); MailBoxPageSteps mailPage = new MailBoxPageSteps(); LetterPageSteps letterPage = new LetterPageSteps(); StarredPageSteps starredPage = new StarredPageSteps(); SpamPageSteps spamPage = new SpamPageSteps(); //MailBoxPageSteps mailPage = new MailBoxPageSteps(); //StarredPageSteps starredPage = new StarredPageSteps(); loginPage.Open(); loginPage.Authorize(D.user2, D.password); mailPage.WriteMessage(D.user3, "For starred", "XO"); logoutPage.CommonExit(); loginPage.Authorize(D.user3, D.password); Console.WriteLine(mainPage.CheckIfItIsStarred()); mainPage.GoToStarred(); Console.WriteLine(starredPage.CheckIfItIsStarredPage("https://mail.google.com/mail/u/0/#starred")); Console.WriteLine(starredPage.CheckTheTopic("For starred")); Console.ReadLine(); }
public void CheckTheSpam() { IpHandler hand = new IpHandler(); MailBoxPageSteps mailPage = new MailBoxPageSteps(); SpamPageSteps spamPage = new SpamPageSteps(); loginPage.Authorize(Data.user1, Data.password); mailPage.WriteMessage(Data.user2, "for spam1", "Spam.123" + hand.GetIp(Data.ip)); logoutPage.CommonExit(); loginPage.Authorize(Data.user2, Data.password); mainPage.AddToSpam(); logoutPage.CommonExit(); loginPage.Authorize(Data.user1, Data.password); mailPage.WriteMessage(Data.user2, "for spam2", "Spam.456"); logoutPage.CommonExit(); loginPage.Authorize(Data.user2, Data.password); mainPage.GoToSpam(); spamPage.CheckSpam(); Assert.AreEqual("for spam2", spamPage.topic); }
public void CheckForwardingOfMessages() { string path = TestContext.CurrentContext.TestDirectory; // SettingPageSteps sett = new SettingPageSteps(); FormOfForwardPageSteps formPage = new FormOfForwardPageSteps(); LetterPageSteps letter = new LetterPageSteps(); MailBoxPageSteps mess = new MailBoxPageSteps(); BinPageSteps binPage = new BinPageSteps(); loginPage.Authorize(Data.user2, Data.password); mainPage.GoToSettings(); settPage.GoToForward(); forwardPage.SetForward(Data.user3); logoutPage.CommonExit(); loginPage.Authorize(Data.user3, Data.password); mainPage.OpenLetter(); letter.GoByLinkToConfirm(); logoutPage.CommonExit(); loginPage.Authorize(Data.user2, Data.password); mainPage.GoToSettings(); settPage.GoToForward(); forwardPage.CreateFilter(); mainPage.GoToSettings(); settPage.GoToForward(); forwardPage.AddFilter(); formPage.ConfirmForward(Data.user1); logoutPage.CommonExit(); loginPage.Authorize(Data.user1, Data.password); mess.WriteMessageWithAttach(Data.user2, "With attach", "attach", path + Data.txtFile); mess.WriteMessage(Data.user2, "Without attach", "There is no attachment here."); logoutPage.CommonExit(); loginPage.Authorize(Data.user2, Data.password); Assert.True(mainPage.CheckUserInInbox()); Assert.False(mainPage.CheckLabel()); mainPage.GoToBin(); Assert.True(binPage.CheckLabelInBin()); Assert.True(binPage.CheckUserInBin()); logoutPage.CommonExit(); loginPage.Authorize(Data.user3, Data.password); Assert.True(mainPage.CheckUserInInbox()); Assert.False(mainPage.CheckLabel()); //************ //logoutPage.CommonExit(); //loginPage.Authorize(Data.user2, Data.password); //mainPage.GoToSettings(); //settPage.GoToForward(); //forwardPage.RemoveFilter(); //*********** }