Esempio n. 1
0
 public void Logout()
 {
     WaitUntilElementDisplayed(driver, By.XPath("//*[contains(@aria-label, 'Selenium')]"));
     LoggedUser.Click();
     SignOutButton.Click();
     Assert.IsTrue(PasswordInput.Displayed);
 }
Esempio n. 2
0
        public void VerifyInboxFolder(string username, string password, string username1, string password1)
        {
            Login(username, password);
            WaitUntilElementDisplayed(driver, By.CssSelector("div[gh='cm']"));
            NewEmailButton.Click();
            WaitUntilElementDisplayed(driver, By.XPath("//textarea[@aria-label='To']"));
            NewEmailToInput.SendKeys("*****@*****.**");
            NewEmailSubjectInput.SendKeys(subjectToSend);
            WaitUntilElementDisplayed(driver, By.XPath("//*[@data-tooltip='Sent']"));
            SendEmailButton.Click();
            Thread.Sleep(1000);
            WaitUntilElementDisplayed(driver, By.XPath("//*[contains(@aria-label, 'Selenium')]"));
            LoggedUser.Click();
            WaitUntilElementDisplayed(driver, By.XPath("//*[@id = 'gb_71']"));
            SignOutButton.Click();
            driver.Quit();

            //var Driver = new ChromeDriver(@"D:\Automation");
            PageObject gmail = new PageObject(driver);

            NavigateTo();

            //Login(username1, password1);
            //List<IWebElement> emails = driver.FindElements(By.CssSelector("div[class = 'ae4 aDM']> div>div>table>tbody>tr")).ToList();
            //foreach (IWebElement email in emails)
            //{
            //    if (email.Text.Contains(sss) == true)
            //    {
            //        email.Click();
            //        break;
            //    }
            //    else
            //    {
            //        driver.Close();
            //    }
            //}
        }
Esempio n. 3
0
        public void SignOut()
        {
            GmailAccountOptions.Click();

            SignOutButton.Click();
        }