Exemplo n.º 1
0
        public bool SendFromGmailToMailRuMessage(IWebDriver driver, string mailruFullLogin, string textOfMessege)//method for send a message from gmail account
        {
            GmailAccountPage gmailAccountPage = new GmailAccountPage(driver);

            gmailAccountPage.WriteMessageButton.Click();

            GmailWriteMessageWindow gmailWriteMessageWindow = new GmailWriteMessageWindow(driver);

            gmailWriteMessageWindow.AddressOfRecipientInputField.SendKeys(mailruFullLogin);
            gmailWriteMessageWindow.TextOfMessageInputField.SendKeys(textOfMessege);
            gmailWriteMessageWindow.MessageSendButton.Click();
            return(true);
        }
Exemplo n.º 2
0
        public bool ReadReplyFromMailRu(IWebDriver driver)//method for reading a reply
        {
            Thread.Sleep(10000);
            driver.Navigate().Refresh();
            GmailAccountPage gmailAccountPage = new GmailAccountPage(driver);

            gmailAccountPage.FindLastUnreadMessageBar(driver);
            gmailAccountPage.LastUnreadMessageBar.Click();

            GmailMessageReply gmailMessageReply = new GmailMessageReply(driver);

            Console.WriteLine("Reply received. Text of reply:\n" + gmailMessageReply.ReplyTextContainer.Text);

            return(true);
        }