public void Register(string planType)
            {
                var d = new Data.AccountInfo();


                EmailField.SendKeys(planType + d.Email);
                EmailConfirmField.SendKeys(planType + d.Email);
                UsernameField.SendKeys(planType + d.username);
                PasswordField.SendKeys(d.Password);
                ConfirmPasswordField.SendKeys(d.Password);
                SelectElement SecurityQuestionDrop = new SelectElement(SecurityQuestionDropdown);

                SecurityQuestionDrop.SelectByText(d.Securityselection);
                SecurityQuestionAnswer.SendKeys(d.Securityanswer);
                NextButton.Click();

                if (this._driver.Url == @"https://betacustomeraccess.myfloridaprepaid.com/enrollment/accountowner.aspx")
                {
                    Tests.successCount++;
                    Console.WriteLine("User: "******" created]");
                }
                else
                {
                    Tests.failCount++;
                    Console.WriteLine("[FAIL] [RUN #" + Tests.runCount + "]" + "[User: "******" not created]");
                }
            }
        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();
        }
Ejemplo n.º 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();
 }