Esempio n. 1
0
 /// <summary>
 /// Sets Old Password, New Password, Confirm Password and clicks Save button.
 /// </summary>
 /// <param name="oldPassword"></param>
 /// <param name="newPassword"></param>
 /// <param name="confirmNewPassword"></param>
 public void SetNewPassword(string oldPassword, string newPassword, string confirmNewPassword)
 {
     OldPasswordField.SendKeys(oldPassword);
     NewPasswordField.SendKeys(newPassword);
     ConfirmNewPasswordField.SendKeys(confirmNewPassword);
     SaveButton.Click();
 }
        public void ValidateNewInformation(UserDto user)
        {
            Helper.ScrollToSeeTheRightButton(_driver, SaveButton);
            OldPasswordField.Click();
            var oldPasswordValue = user.GetType().GetRuntimeProperty("password").GetValue(user);

            if (oldPasswordValue != null)
            {
                OldPasswordField.SendKeys(oldPasswordValue.ToString());
            }
            NewPasswordField.Click();
            var newPasswordValue = user.GetType().GetRuntimeProperty("newPassword").GetValue(user);

            if (newPasswordValue != null)
            {
                NewPasswordField.SendKeys(newPasswordValue.ToString());
            }
            ConfirmPasswordField.Click();
            var confirmPasswordValue = user.GetType().GetRuntimeProperty("newPassword").GetValue(user);

            if (confirmPasswordValue != null)
            {
                ConfirmPasswordField.SendKeys(confirmPasswordValue.ToString());
            }
            SaveButton.Click();
        }