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); }
public void ReportAsSpam() { Utils.WaitSomeElement waitSomeElement = new Utils.WaitSomeElement(this.driver); waitSomeElement.WaitElement(newLetter, 15); newLetter.Click(); openListButton.Click(); spamButton.Click(); }
//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(); }
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); }
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) { } }
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) { } } }
public void CheckUnreadLetterInSpamFolder() { Utils.WaitSomeElement waitSomeElement = new Utils.WaitSomeElement(this.driver); waitSomeElement.WaitElement(newLetter, 15); newLetter.Click(); }