Ejemplo n.º 1
0
 public void GoToInboxFolder()
 {
     Utils.AlertChecker    alertChecker    = new Utils.AlertChecker(this.driver);
     Utils.WaitSomeElement waitSomeElement = new Utils.WaitSomeElement(this.driver);
     alertChecker.AlertCheck();
     driver.Navigate().GoToUrl("https://mail.google.com/mail/u/0/#inbox");
     waitSomeElement.WaitElement(gmailLocator, 5);
 }
Ejemplo n.º 2
0
        public void ReportAsSpam()
        {
            Utils.WaitSomeElement waitSomeElement = new Utils.WaitSomeElement(this.driver);

            waitSomeElement.WaitElement(newLetter, 15);
            newLetter.Click();
            openListButton.Click();
            spamButton.Click();
        }
Ejemplo n.º 3
0
        //public void SendMessage(string destinationAdress)
        //{
        //    Utils.WaitSomeElement waitSomeElement = new Utils.WaitSomeElement(driver);
        //    сomposeButton.Click();
        //    destinationField.SendKeys(destinationAdress);
        //    objectField.SendKeys(Tools.RandomTextGenerator.GetRandomString(15));
        //    driver.SwitchTo().Frame(10);
        //    messageField.SendKeys(Tools.RandomTextGenerator.GetRandomString(45));
        //    driver.SwitchTo().ParentFrame();
        //    sendMessageButton.Click();

        //}

        public void SendMessage(string destinationAdress)
        {
            Utils.WaitSomeElement waitSomeElement = new Utils.WaitSomeElement(this.driver);
            //GoToInboxFolder();
            //waitSomeElement.WaitElement(gmailLocator,10);
            сomposeButton.Click();
            destinationField.SendKeys(destinationAdress);
            objectField.SendKeys(Tools.RandomTextGenerator.GetRandomString(15));
            sendMessageButton.Click();
        }
Ejemplo n.º 4
0
 public void Login(string username, string password)
 {
     Utils.AlertChecker    alertChecker    = new Utils.AlertChecker(this.driver);
     Utils.WaitSomeElement waitSomeElement = new Utils.WaitSomeElement(this.driver);
     OpenPage();
     inputLogin.SendKeys(username);
     inputPassword.SendKeys(password);
     buttonSubmit.Click();
     waitSomeElement.WaitElement(gmailLocator, 5);
 }
Ejemplo n.º 5
0
 public void UnmarkLettersAsSpam()
 {
     Utils.WaitSomeElement waitSomeElement = new Utils.WaitSomeElement(this.driver);
     OpenPage();
     waitSomeElement.WaitElement(gmailLocator, 5);
     driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(5));
     try
     {
         if (letterLocator.Displayed)
         {
             markAllLettersButton.Click();
             removeFromSpamButton.Click();
         }
     }
     catch (Exception e)
     { }
 }
Ejemplo n.º 6
0
 public void DeleteAllLetters()
 {
     Utils.WaitSomeElement waitSomeElement = new Utils.WaitSomeElement(this.driver);
     OpenPage();
     waitSomeElement.WaitElement(gmailLocator, 5);
     driver.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(5));
     try
     {
         if (letterLocator.Displayed)
         {
             markAllLettersButton.Click();
             deleteMarkedLettersButton.Click();
         }
     }
     catch (Exception e)
     {
         if (e is ElementNotVisibleException || e is NoSuchElementException)
         {
         }
     }
 }
Ejemplo n.º 7
0
 public void CheckUnreadLetterInSpamFolder()
 {
     Utils.WaitSomeElement waitSomeElement = new Utils.WaitSomeElement(this.driver);
     waitSomeElement.WaitElement(newLetter, 15);
     newLetter.Click();
 }