Example #1
0
        public void oneCanLoginMailRu()
        {
            LoginToEmail loginToEmail = new LoginToEmail(driver);

            loginToEmail.canLoginEmail();
            string title = loginToEmail.getPageTitle();

            Assert.IsNotNull(title, "Title doesn't exist.");
            driver.Close();
        }
Example #2
0
        public void oneCanSendEmail()
        {
            LoginToEmail loginToEmail = new LoginToEmail(driver);

            loginToEmail.canLoginEmail();
            loginToEmail.canCreateEmail();
            loginToEmail.canSendEmail();

            Assert.Throws <NoSuchElementException>(() => loginToEmail.findSentEmailInDrafts());

            driver.Close();
        }
Example #3
0
        public void sentEmailVerification()
        {
            LoginToEmail loginToEmail = new LoginToEmail(driver);

            loginToEmail.canLoginEmail();
            loginToEmail.canCreateEmail();
            loginToEmail.canSendEmail();
            loginToEmail.findSentEmailInSent();

            //this is a check to see if a draft is in 'Sent' folder
            new WebDriverWait(driver, TimeSpan.FromSeconds(3)).Until(ExpectedConditions.ElementExists((By.XPath("//div[(text()='*****@*****.**')]"))));

            driver.Close();
        }
Example #4
0
        public void oneCanCreateEmailAndSaveIt()
        {
            LoginToEmail loginToEmail = new LoginToEmail(driver);

            loginToEmail.canLoginEmail();
            loginToEmail.canCreateEmail();
            //this is a check to see if a draft has correct address
            new WebDriverWait(driver, TimeSpan.FromSeconds(10)).Until(ExpectedConditions.ElementExists((By.XPath("//div[(text()='*****@*****.**')]"))));

            //this is a check to see if a draft has correct subject
            new WebDriverWait(driver, TimeSpan.FromSeconds(10)).Until(ExpectedConditions.ElementExists((By.XPath("//div[(text()='WebDriver Test')]"))));

            //this is a check to see if a draft has correct email body
            new WebDriverWait(driver, TimeSpan.FromSeconds(10)).Until(ExpectedConditions.ElementExists((By.XPath("//span[(text()='Hey, this is WebDriver Test! С уважением, Vl Gl [email protected]')]"))));
            driver.Close();
        }