public void MainGmailTestBO()
        {
            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");

        }
 public void FactoryMethodTestMain()
 {
     IWebDriver driver = factoryDriver.CreateDriver();
     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");
     driver.Quit();
 }