コード例 #1
0
        public void MainGmailTestBO()
        {
            //XmlConfigurator.Configure();
            //BasicConfigurator.Configure();
            log.Warn("Starting test with Logging");
            log.Info("1. Add logging for step in your solution with log4net libraries. Use different log level, e.g. info, error - DONE");

            LoginPage loginPage = new LoginPage(driver);

            LoginPageWf.LoginToGmail(loginPage, UserName, UserPass);
            Assert.That(driver.Url.Equals("https://mail.google.com/mail/u/0/#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");
        }
コード例 #2
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");
        }