public void ChangePasswordwithoutConfirmedNewPassword()
        {
            LoginUser          user       = AccessExcelData.GetTLoginUserData("ChangePasswordwithoutConfirmedNewPassword");
            LoginPage          loginPage  = new LoginPage(driver);
            ManagePasswordPage managePage = new ManagePasswordPage(driver);

            loginPage.NavigateTo();
            loginPage.FillCredentials(user);
            managePage.FillSubmitPasswordData(user);
            Assert.AreEqual("The new password and confirmation password do not match.", managePage.ErrorPasswordsMismatch2.Text);
        }
        public void ChangePasswordwithInvalidCurrentPassword()
        {
            LoginUser          user       = AccessExcelData.GetTLoginUserData("ChangePasswordwithInvalidCurrentPassword");
            LoginPage          loginPage  = new LoginPage(driver);
            ManagePasswordPage managePage = new ManagePasswordPage(driver);

            loginPage.NavigateTo();
            loginPage.FillCredentials(user);
            managePage.FillSubmitPasswordData(user);
            Assert.AreEqual("Incorrect password.", managePage.ErrorIncorrectPassword.Text);
        }
        static void Main(string[] args)
        {
            ChromeOptions options = new ChromeOptions();
            ChromeDriver  driver  = new ChromeDriver(options);

            driver.Manage().Window.Maximize();
            driver.Url = @"http://lyubenov.com/up/";

            var create = driver.ExecuteScript("show_register_form();");

            RegistrationPage registrationPage = new RegistrationPage(driver);
            RegisterUser     user             = new RegisterUser("Test", "123456789", "123456789", "*****@*****.**");

            registrationPage.RegistrationForm(user);

            registrationPage.AssertRegistrationFormExsists("Регистрирай се");
            registrationPage.AssertRegisterNewUser("Your account was created successfully.");

            LoginPage loginPage = new LoginPage(driver);
            LoginUser loginUser = new LoginUser("Test", "123456789");

            loginPage.LoginForm(loginUser);

            loginPage.AssertSiteIsLoaded("http://lyubenov.com/up/");
            loginPage.AssertUserIsLogged("You are logged successfully. Redirecting...");

            ManagePasswordPage page       = new ManagePasswordPage(driver);
            LoginUser          loggedUser = new LoginUser("*****@*****.**");

            page.ChangePassword(loggedUser);

            page.AssertEmailIsSend("Your new password was sent successfully.");

            UserProfilePage userProfilePage = new UserProfilePage(driver);

            userProfilePage.LoginFormAndUploadFile(loginUser);

            userProfilePage.AssertFileIsUpload("Drag & Drop files or Click");

            userProfilePage.SearchUploadedFiles();

            userProfilePage.AssertSearchFileExists("1.png");

            userProfilePage.ChangeOlderPasswordWithNewPassword();

            userProfilePage.AssertOlderPasswordIsChangedWithNewPassword("OK: YOUR PASSWORD WAS CHANGED.");

            userProfilePage.Logout.Click();

            userProfilePage.AssertLogoutUser("Web Cloud Test Server");
        }
        public void CheckPasswordIsChanged()
        {
            ManagePasswordPage managePasswordPage = new ManagePasswordPage(this.driver);

            managePasswordPage.NavigateTo();

            RegistrationPage registrationPage = new RegistrationPage(this.driver);

            var username        = "******";
            var password        = "******";
            var confirmPassword = "******";
            var email           = username + "@mail.bg";
            var user            = new RegisterUser(username, password, confirmPassword, email);

            registrationPage.RegistrationForm(user);

            LoginUser loginUser = new LoginUser(email);

            managePasswordPage.ChangePassword(loginUser);

            managePasswordPage.AssertEmailIsSend("Your new password was sent successfully.");
        }