Exemplo n.º 1
0
        public void MainGmailTest()
        {
            LoginPage loginPage = new LoginPage(driver);
            LoginPageWf.LoginToGmail(loginPage, UserName, UserPass);
            Assert.That(driver.Url.Equals("https://mail.google.com/mail/#inbox"), "Log in failed");

            MailBoxPage mailPage = new MailBoxPage(driver);
            string to = UserName + "@gmail.com";
            string subj = "Test subject " + Random;
            string body = "Test mail body text: " + Random;
            MailBoxPageWf.CreateNewMail(mailPage, to, subj, body);
            MailBoxPageWf.CheckDraft(mailPage,to, subj, body);
            MailBoxPageWf.SendMailAndCheck(mailPage,subj);
            MailBoxPageWf.LogOut(mailPage);
            Assert.That(driver.Title == "Gmail");
        }
Exemplo n.º 2
0
 public void DecoratorTestMain()
 {
     driver = new Decorator(driver);
     driver.Navigate().GoToUrl(HomePage);
     LoginPage loginPage = new LoginPage(driver);
     LoginPageWf.LoginToGmail(loginPage, UserName, UserPass);
     Assert.That(driver.Url.Equals("https://mail.google.com/mail/#inbox"), "Log in failed");
     string to = UserName + "@gmail.com";
     string subj = "Test subject " + Random;
     string body = "Test mail body text: " + Random;
     Mail mail = new Mail();
     mail = mail.createMail(subj, to, body);
     MailBoxPage mailPage = new MailBoxPage(driver);
     MailBoxPageWf.CreateAndSaveNewMail(mailPage, mail);
     MailBoxPageWf.CheckDraft(mailPage, mail);
     MailBoxPageWf.SendMailAndCheck(mailPage, mail);
     MailBoxPageWf.LogOut(mailPage);
     Assert.That(driver.Title == "Gmail");
 }
Exemplo n.º 3
0
 public LoginPageWf()
 {
     page = new LoginPage();
 }