Esempio n. 1
0
        public void successfulChangeAndThenReturningTheOriginalPassword()
        {
            changePasswordPage.changePassword("Admin1*", "Admin1!", "Admin1!");
            managePage = new ManagePage(driver);
            string message = managePage.getSuccessMessage();

            Assert.AreEqual("Your password has been changed.", message);

            managePage.clickOnLogOutBtn();
            string url = "http://*****:*****@yahoo.com", "Admin1*");
            loginPage.waitForError();
            string loginError = loginPage.getError();

            Assert.AreEqual("Invalid login attempt.", loginError);

            loginPage.login("*****@*****.**", "Admin1!");
            wait.Until(wt => wt.FindElement(By.LinkText("*****@*****.**")));
            driver.FindElement(By.LinkText("*****@*****.**")).Click();
            managePage = new ManagePage(driver);
            managePage.goToChangePasswordPage();
            changePasswordPage = new ChangePasswordPage(driver);

            changePasswordPage.changePassword("Admin1!", "Admin1*", "Admin1*");
            managePage = new ManagePage(driver);
            message    = managePage.getSuccessMessage();
            Assert.AreEqual("Your password has been changed.", message);
        }
Esempio n. 2
0
        public void EmptyFields()
        {
            changePasswordPage.changePassword("", "", "");
            string currentPasswordError = changePasswordPage.getCurrentPasswordValidationMessage();
            string newPasswordError     = changePasswordPage.getNewPasswordValidationMessage();

            Assert.AreEqual("The Current password field is required.", currentPasswordError);
            Assert.AreEqual("The New password field is required.", newPasswordError);
        }