Пример #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();
        }
Пример #3
0
 internal void UpdatePassword()
 {
     GlobalDefinitions.ExcelLib.PopulateInCollection(MarsResource.ExcelPath, "SignIn");
     Thread.Sleep(5000);
     ClickOnGreeting.Click();
     Thread.Sleep(1000);
     ChangePasswordLink.Click();
     CurrentPasswordField.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Current Password"));
     NewPasswordField.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "New Password"));
     ConfirmPasswordField.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Confirm Password"));
     SaveButton.Click();
 }