Exemplo n.º 1
0
        public void SendMailReadMessageStateTest()
        {
            MailRuAuthorizationPageObject mailRuAuthorizationPage = new MailRuAuthorizationPageObject(_webDriver);
            string messageState = mailRuAuthorizationPage
                                  .Login(UserDataForTests.Destination, UserDataForTests.DestinationPassword)
                                  .GetMessageState();

            Assert.AreEqual(ServiceNotificationsForTest.ReadMessageTitle, messageState);
        }
Exemplo n.º 2
0
        public void SendMailSenderTest()
        {
            MailRuAuthorizationPageObject mailRuAuthorizationPage = new MailRuAuthorizationPageObject(_webDriver);
            string senderName = mailRuAuthorizationPage
                                .Login(UserDataForTests.Destination, UserDataForTests.DestinationPassword)
                                .OpenMessage()
                                .GetSenderName();

            Assert.AreEqual(UserDataForTests.UserCorrectLogin, senderName);
        }
Exemplo n.º 3
0
        public void SendMailContentTest()
        {
            MailRuAuthorizationPageObject mailRuAuthorizationPage = new MailRuAuthorizationPageObject(_webDriver);
            string recievedMessage = mailRuAuthorizationPage
                                     .Login(UserDataForTests.Destination, UserDataForTests.DestinationPassword)
                                     .OpenMessage()
                                     .GetMessageText();

            Assert.AreEqual(UserDataForTests.UserMessage, recievedMessage);
        }
Exemplo n.º 4
0
        public void OneTimeTearDown()
        {
            _webDriver = new ChromeDriver();
            _webDriver.Manage().Window.Maximize();
            _webDriver.Navigate().GoToUrl("https://mail.ru");
            MailRuAuthorizationPageObject mailRuAuthorizationPage = new MailRuAuthorizationPageObject(_webDriver);

            mailRuAuthorizationPage
            .Login(UserDataForTests.Destination, UserDataForTests.DestinationPassword)
            .OpenMessage()
            .Respond(UserDataForTests.NewName + " " + UserDataForTests.NewSurname);
            _webDriver.Quit();
        }
Exemplo n.º 5
0
        public void OneTimeSetup()
        {
            _webDriver = new ChromeDriver();
            _webDriver.Manage().Window.Maximize();
            _webDriver.Navigate().GoToUrl("https://gmail.com");
            GoogleAuthorizationPageObject googleAuthorizationPage = new GoogleAuthorizationPageObject(_webDriver);

            googleAuthorizationPage
            .Login(UserDataForTests.UserCorrectLogin, UserDataForTests.UserCorrectPassword)
            .SendMessage(UserDataForTests.Destination, UserDataForTests.UserMessage);
            _webDriver.Navigate().GoToUrl("https://mail.ru");
            MailRuAuthorizationPageObject mailRuAuthorizationPage = new MailRuAuthorizationPageObject(_webDriver);

            mailRuAuthorizationPage
            .Login(UserDataForTests.Destination, UserDataForTests.DestinationPassword)
            .WaitUntilMessageRecieved();
        }