Exemplo n.º 1
0
        internal void ChangePassword()
        {
            //Populate the Excel sheet
            GlobalDefinitions.ExcelLib.PopulateInCollections(Global.Base.ExcelPath, "SignIn");

            GlobalDefinitions.wait(60);

            Actions builder = new Actions(Global.GlobalDefinitions.driver);

            builder.MoveToElement(UsernameNavigation).Build().Perform();

            UsernameNavigation.Click();

            GlobalDefinitions.wait(60);

            ChangePasswordMenu.Click();



            CurrentPassword.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "CurrentPassword"));

            NewPassword.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "NewPassword"));

            ConfirmPassword.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "ConfirmPassword"));

            GlobalDefinitions.wait(60);

            Savebutton.Click();
        }
Exemplo n.º 2
0
        internal string register()
        {
            //Populate the excel data
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "SignUp");
            //Click on Join button
            Join.Click();

            //Enter FirstName
            FirstName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "FirstName"));

            //Enter LastName
            LastName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "LastName"));

            //Enter Email
            Email.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Email"));

            //Enter Password
            Password.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Password"));

            //Enter Password again to confirm
            ConfirmPassword.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "ConfirmPswd"));

            //Click on Checkbox
            Checkbox.Click();

            //Click on join button to Sign Up
            JoinBtn.Click();

            return(Global.GlobalDefinitions.driver.FindElement(By.XPath("//*[@id='account-profile-section']/div/div[1]/a")).Text);
        }
Exemplo n.º 3
0
        public void EnterUserDetails()
        {
            string password = TestData.RandomPassword();

            if (Username.Displayed)
            {
                Username.Clear();
                Username.SendKeys(TestData.RandomUserName());
                Console.WriteLine(Username.GetAttribute("value"));
            }
            if (Password.Displayed)
            {
                Password.Clear();
                Password.SendKeys(password);
                Console.WriteLine(Password.GetAttribute("value"));
            }
            if (ConfirmPassword.Displayed)
            {
                ConfirmPassword.Clear();
                ConfirmPassword.SendKeys(password);
                Console.WriteLine(ConfirmPassword.GetAttribute("value"));
            }
            if (SubmitButton.Displayed)
            {
                SubmitButton.Click();
                Thread.Sleep(5000);
            }
        }
Exemplo n.º 4
0
        void ReleaseDesignerOutlets()
        {
            if (ConfirmPassword != null)
            {
                ConfirmPassword.Dispose();
                ConfirmPassword = null;
            }

            if (Password != null)
            {
                Password.Dispose();
                Password = null;
            }

            if (Submit != null)
            {
                Submit.Dispose();
                Submit = null;
            }

            if (Username != null)
            {
                Username.Dispose();
                Username = null;
            }
        }
Exemplo n.º 5
0
        internal void Register()
        {
            // Populate the Excel Data
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "Registration");
            Thread.Sleep(500);

            // Click the Join button on the Home page
            Join.Click();

            // Input the First name field with valid characters
            Firstname.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Firstname"));

            // Input the Last name field with valid characters
            Lastname.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Lastname"));

            // Input the Email address field with valid characters
            Emailaddress.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Emailaddress"));

            // Input the Password field with valid characters
            Password.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Password"));

            // Input the Confirm Password field with valid characters
            ConfirmPassword.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "ConfirmPassword"));

            // Click the I agree to the terms and conditions checkbox
            Checkbox.Click();

            // Click the Join button on the Registration form page
            Joinbtn.Click();
        }
Exemplo n.º 6
0
        public void SignUpSteps()
        {
            CommonMethods.test = CommonMethods.extent.StartTest("Sign up steps test");

            //Populate the excel data
            ExcelLib.PopulateInCollection(ConstantUtils.TestDataPath, "SignUp");

            //Click on Join button
            Join.Click();

            // Wait
            CommonMethods.WaitForElement(Driver.driver, "Name", "firstName", 10);

            //Enter FirstName
            FirstName.SendKeys(ExcelLib.ReadData(2, "FirstName"));

            //Enter LastName
            LastName.SendKeys(ExcelLib.ReadData(2, "LastName"));

            //Enter Email
            Email.SendKeys(ExcelLib.ReadData(2, "Email"));

            //Enter Password
            Password.SendKeys(ExcelLib.ReadData(2, "Password"));

            //Enter Password again to confirm
            ConfirmPassword.SendKeys(ExcelLib.ReadData(2, "ConfirmPswd"));

            //Click on Checkbox
            Checkbox.Click();

            //Click on join button to Sign Up
            JoinBtn.Click();
        }
Exemplo n.º 7
0
        internal void register()
        {
            //Populate the excel data
            GlobalDefinitions.ExcelLib.PopulateInCollection(Base.ExcelPath, "SignUp");
            //Click on Join button
            Join.Click();

            //Enter FirstName
            FirstName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "FirstName"));

            //Enter LastName
            LastName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "LastName"));

            //Enter Email
            Email.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Email"));

            //Enter Password
            Password.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Password"));

            //Enter Password again to confirm
            ConfirmPassword.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "ConfirmPswd"));

            //Click on Checkbox
            Checkbox.Click();

            //Click on join button to Sign Up
            JoinBtn.Click();
        }
Exemplo n.º 8
0
 private void ExecuteSavePasswordCommand()
 {
     if (String.IsNullOrEmpty(Password))
     {
         ErrorMessage = "Password is required.";
     }
     else if (Password.Trim() != ConfirmPassword.Trim())
     {
         ErrorMessage = "Passwords do not match.";
     }
     else
     {
         using (var dp = SimpleIoc.Default.GetInstance <IUnitOfWorkFactory>().CreateUnitOfWork())
         {
             var repo    = dp.SettingsRepository;
             var setting = repo.FindSingle(k => k.Key == CottonDBMS.DataModels.TruckClientSettingKeys.ADMIN_PASSWORD);
             setting.Value = _password.Trim();
             repo.Update(setting);
             dp.SaveChanges();
         }
         PasswordModalVisible = false;
         SettingsLocked       = true;
         DialogOpen           = false;
     }
 }
Exemplo n.º 9
0
        internal void register()
        {
            //Click on Join button
            Join.Click();

            //Enter FirstName
            FirstName.SendKeys(firstname);

            //Enter LastName
            LastName.SendKeys(lastname);

            //Enter Email
            Email.SendKeys(email);

            //Enter Password
            Password.SendKeys(password);

            //Enter Password again to confirm
            ConfirmPassword.SendKeys(confirmpassword);

            //Click on Checkbox
            Checkbox.Click();

            //Click on join button to Sign Up
            JoinBtn.Click();
        }
Exemplo n.º 10
0
        public PersonalPageClass CreateNewAccount(string username = null, string password = null)
        {
            LogoutFromApplication();
            CreatAccLink.Click();

            if (username == null)
            {
                UserName.SendKeys(ObjectRepository.Config.GetUsername());
            }
            else
            {
                UserName.SendKeys(username);
            }

            if (password == null)
            {
                Password.SendKeys(ObjectRepository.Config.GetPassword());
                ConfirmPassword.SendKeys(ObjectRepository.Config.GetPassword());
            }
            else
            {
                Password.SendKeys(password);
                ConfirmPassword.SendKeys(password);
            }

            LoginBtn.Click();
            return(new PersonalPageClass(Driver));
        }
Exemplo n.º 11
0
        private void ExecuteSavePasswordCommand()
        {
            if (string.IsNullOrWhiteSpace(Password))
            {
                PasswordErrorMessage = "Password is required.";
            }
            else if (string.IsNullOrWhiteSpace(ConfirmPassword))
            {
                PasswordErrorMessage = "Confirm password is required";
            }
            else if (Password.Trim() != ConfirmPassword.Trim())
            {
                PasswordErrorMessage = "Passwords do not match.";
            }
            else
            {
                //error checking passed so we can save the lock code
                using (var dp = SimpleIoc.Default.GetInstance <IUnitOfWorkFactory>().CreateUnitOfWork())
                {
                    dp.SettingsRepository.UpsertSetting(TruckClientSettingKeys.ADMIN_PASSWORD, Password.Trim());
                    dp.SaveChanges();

                    _windowService.CloseModalWindow(WindowType.TruckSetupWindow);
                    GalaSoft.MvvmLight.Messaging.Messenger.Default.Send <FirstSetupWizardComplete>(new FirstSetupWizardComplete());
                }
            }
        }
Exemplo n.º 12
0
        internal void Register()
        {
            //extent Reports
            //Global.Base.test = Global.Base.extent.StartTest("Login Test");
            //Base.ExtentReports();

            //Click on Join button
            Join.Click();

            //Enter Firstname
            Firstname.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Firstname"));

            //Enter Lastname
            Lastname.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Lastname"));

            //Enter Email
            Email.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Email"));

            //Enter Password
            Password.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Password"));

            //Enter Password again to confirm
            ConfirmPassword.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "ConfirmPswd"));

            //Click on Checkbox
            Checkbox.Click();

            //Click on join button to Sign Up
            JoinBtn.Click();
        }
Exemplo n.º 13
0
        internal void Register()
        {
            //Click on Join button
            Join.Click();

            //Enter FirstName
            FirstName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "FirstName"));

            //Enter LastName
            LastName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "LastName"));

            //Enter Email
            Email.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Email"));

            //Enter Password
            Password.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Password"));

            //Enter Password again to confirm
            ConfirmPassword.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "ConfirmPswd"));

            //Click on Checkbox
            Checkbox.Click();

            //Click on join button to Sign Up
            JoinBtn.Click();
        }
Exemplo n.º 14
0
 public void FillForm(RegistrationUser user)
 {
     Email.SendKeys(user.Email);
     FullName.SendKeys(user.FullName);
     Password.SendKeys(user.Password);
     ConfirmPassword.SendKeys(user.ConfirmPassword);
 }
Exemplo n.º 15
0
        internal void register()
        {
            //Populate the excel data
            GlobalDefinitions.ExcelLib.PopulateInCollection(MarsResources.ExcelPath, "SignUp");
            // Navigate to Url
            driver.Navigate().GoToUrl(GlobalDefinitions.ExcelLib.ReadData(2, "Url"));
            //Click on Join button
            Join.Click();
            Thread.Sleep(2000);

            //Enter FirstName
            FirstName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "FirstName"));

            //Enter LastName
            LastName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "LastName"));

            //Enter Email
            Email.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "EmailAddress"));

            //Enter Password
            Password.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Password"));

            //Enter Password again to confirm
            ConfirmPassword.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "ConfirmPassword"));

            //Click on Checkbox
            Checkbox.Click();

            //Click on join button to Sign Up
            JoinBtn.Click();
        }
Exemplo n.º 16
0
        internal void register()
        {
            //Populate the excel data
            GlobalDefinitions.ExcelLib.PopulateInCollection(@"C:\Users\Neelam\Desktop\Mars project\MarsFramework-master\MarsFramework\ExcelData\TestDataShareSkill.xlsx", "SignUp");
            //Click on Join button
            Join.Click();

            //Enter FirstName
            FirstName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "FirstName"));

            //Enter LastName
            LastName.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "LastName"));

            //Enter Email
            Email.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Email"));

            //Enter Password
            Password.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "Password"));

            //Enter Password again to confirm
            ConfirmPassword.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "ConfirmPswd"));

            //Click on Checkbox
            Checkbox.Click();

            //Click on join button to Sign Up
            JoinBtn.Click();
        }
Exemplo n.º 17
0
 private bool CheckInput()
 {
     if (string.IsNullOrEmpty(oldPassword.Text.Trim()))
     {
         oldPassword.Focus();
         tip.Show("必须输入", oldPassword, 1000);
         return(false);
     }
     else if (string.IsNullOrEmpty(newPassowrd.Text.Trim()))
     {
         newPassowrd.Focus();
         tip.Show("必须输入", newPassowrd, 1000);
         return(false);
     }
     else if (string.IsNullOrEmpty(ConfirmPassword.Text.Trim()))
     {
         ConfirmPassword.Focus();
         tip.Show("必须输入", ConfirmPassword, 1000);
         return(false);
     }
     else
     {
         return(true);
     }
 }
Exemplo n.º 18
0
        public void register()
        {
            //Populate the excel data
            ExcelLib.PopulateInCollection(Base.ExcelPath, "SignUp");
            GlobalDefinitions.NavigateUrl();
            //Click on Join button
            Join.Click();

            //Enter FirstName
            FirstName.SendKeys(ExcelLib.ReadData(2, "FirstName"));

            //Enter LastName
            LastName.SendKeys(ExcelLib.ReadData(2, "LastName"));

            //Enter Email
            Email.SendKeys(ExcelLib.ReadData(2, "Email"));

            //Enter Password
            Password.SendKeys(ExcelLib.ReadData(2, "Password"));

            //Enter Password again to confirm
            ConfirmPassword.SendKeys(ExcelLib.ReadData(2, "ConfirmPswd"));

            //Click on Checkbox
            Terms.Click();

            //Click on join button to Sign Up
            SubmitButton.Click();
        }
Exemplo n.º 19
0
        //Register to SkillSwap Website
        public void JoinStep(SignUpDetails signUpObj)
        {
            //Click on Join link to register to the SkillSwap Website
            JoinLink.Click();

            //Enter First Name
            FirstName.SendKeys(signUpObj.FirstName);

            //Enter Last Name
            LastName.SendKeys(signUpObj.LastName);

            //Enter Email address
            EmailAddress.SendKeys(signUpObj.EmailAddress);

            //Enter Password
            Password.SendKeys(signUpObj.Password);

            //Enter Confirm Password
            ConfirmPassword.SendKeys(signUpObj.ConfirmPassword);

            //Click on Terms and Conditions checkbox
            TermAndCondition.Click();

            //Click on Join button
            JoinButton.Click();
        }
Exemplo n.º 20
0
        internal void register()
        {
            //Click on Join button
            Join.Click();
            Thread.Sleep(2000);

            //Enter FirstName
            FirstName.SendKeys(ExcelLibHelper.ReadData(2, "FirstName"));

            //Enter LastName
            LastName.SendKeys(ExcelLibHelper.ReadData(2, "LastName"));

            //Enter Email
            Email.SendKeys(ExcelLibHelper.ReadData(2, "Email"));

            //Enter Password
            Password.SendKeys(ExcelLibHelper.ReadData(2, "Password"));

            //Enter Password again to confirm
            ConfirmPassword.SendKeys(ExcelLibHelper.ReadData(2, "Confirm Password"));

            //Click on Checkbox
            Checkbox.Click();

            //Click on join button to Sign Up
            JoinBtn.Click();
        }
 public void Salvar(string nome, string email, string senha, string confirmacaoSenha)
 {
     Nome.PreencherCampo(nome);
     Email.PreencherCampo(email);
     Password.PreencherCampo(senha);
     ConfirmPassword.PreencherCampo(confirmacaoSenha);
     BtnSubmit.Clicar().Aguardar(tempoEspera);
 }
Exemplo n.º 22
0
 public void FillForm(RegistrationUser user)
 {
     FullName.SendKeys(user.FullName);
     EMail.SendKeys(user.Email);
     Password.SendKeys(user.Password);
     ConfirmPassword.SendKeys(user.ConfirmPassword);
     RegisterButton.Click();
 }
Exemplo n.º 23
0
        /// <summary>
        /// Commit the content and exits out of edit mode
        /// </summary>
        public void Save()
        {
            //Make sure the current password is correct
            //TODO: This will come from the real back-end store of this user password
            //      or via the web server to confirm it
            var storePassword = "******";

            //Confirm current password is match
            //NOTE: Typically this isn't done here, it's done on the server
            if (storePassword != CurrentPassword.Unsecure())
            {
                //Let us know
                IoC.UI.ShowMessage(new MessageBoxDialogViewModel
                {
                    Title   = "Wrong password",
                    Message = "The current password is invalid",
                });

                return;
            }

            //Now check the new and confirm password match
            //NOTE: Typically this isn't done here, it's done on the server
            if (NewPassword.Unsecure() != ConfirmPassword.Unsecure())
            {
                //Let us know
                IoC.UI.ShowMessage(new MessageBoxDialogViewModel
                {
                    Title   = "Password mismatch",
                    Message = "The new and confirm password do not match",
                });

                return;
            }

            //Check we actually have a password
            if (NewPassword.Unsecure().Length == 0)
            {
                //Let us know
                IoC.UI.ShowMessage(new MessageBoxDialogViewModel
                {
                    Title   = "Password too short",
                    Message = "You must enter a password!",
                });

                return;
            }

            //Set the edited password to the current value
            CurrentPassword = new SecureString();
            foreach (var c in NewPassword.Unsecure().ToCharArray())
            {
                CurrentPassword.AppendChar(c);
            }


            Editing = false;
        }
 private bool CanExecuteCommand()
 {
     MailHintChange();
     if (string.IsNullOrWhiteSpace(Name) || string.IsNullOrWhiteSpace(Surname) || string.IsNullOrWhiteSpace(ConfirmPassword) || string.IsNullOrWhiteSpace(Password) || string.IsNullOrWhiteSpace(Email))
     {
         return(false);
     }
     return((ConfirmPassword.Equals(Password)) && IsCorrectEmail());
 }
 public void FillRegistrationForm(RegistrationUser user)
 {
     Email.SendKeys(user.Email);
     Password.SendKeys(user.Password);
     ConfirmPassword.SendKeys(user.ConfirmPassword);
     DisplayName.SendKeys(user.DisplayName);
     YearofBirth.SendKeys(user.YearofBirth);
     RegisterButton.Click();
 }
Exemplo n.º 26
0
        private bool hasError()
        {
            if (!Password.Value.Equals(ConfirmPassword.Value))
            {
                ConfirmPassword.Error = "passwords do not match";
            }

            return(Username.hasErrors() || Password.hasErrors() || ConfirmPassword.hasErrors());
        }
Exemplo n.º 27
0
 private void ClearForm()
 {
     CurrentPassword.Dispose();
     CurrentPassword = new SecureString();
     NewPassword.Dispose();
     NewPassword = new SecureString();
     ConfirmPassword.Dispose();
     ConfirmPassword = new SecureString();
 }
Exemplo n.º 28
0
        internal void AddNewPassword()
        {
            CurrentPassword.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "CurrentPassword"));
            NewPassword.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "NewPassword"));
            ConfirmPassword.SendKeys(GlobalDefinitions.ExcelLib.ReadData(2, "ConfirmPassword"));
            Thread.Sleep(1000);

            SaveChanges.Click();
        }
Exemplo n.º 29
0
 public void ChangePassword()
 {
     ProfileList.ClickOn();
     ChangePasswordScreen.ClickOn();
     OldPassword.EnterClearText(Constant.groupUser);
     NewPassword.EnterClearText(Constant.loginPassword);
     ConfirmPassword.EnterClearText(Constant.loginPassword);
     changePasswordBtn.ClickOn();
 }
Exemplo n.º 30
0
        public void Validate()
        {
            if (!string.IsNullOrEmpty(NewPassword))
            {
                NewPassword = NewPassword.Trim();
            }

            if (string.IsNullOrEmpty(NewPassword))
            {
                LocalFunctions.AddError("Please enter new password", MethodBase.GetCurrentMethod(), false, false);
            }
            else
            {
                if (NewPassword.Length < 6)
                {
                    LocalFunctions.AddError("Password min lenght should be 6", MethodBase.GetCurrentMethod(), false, false);
                }

                if (NewPassword.Length > 30)
                {
                    LocalFunctions.AddError("Password max lenght is 30", MethodBase.GetCurrentMethod(), false, false);
                }
            }


            if (!string.IsNullOrEmpty(ConfirmPassword))
            {
                ConfirmPassword = ConfirmPassword.Trim();
            }

            if (string.IsNullOrEmpty(ConfirmPassword))
            {
                LocalFunctions.AddError("Please enter confirm password", MethodBase.GetCurrentMethod(), false, false);
            }
            else if (ConfirmPassword != NewPassword)
            {
                LocalFunctions.AddError("Confirm password is not same", MethodBase.GetCurrentMethod(), false, false);
            }


            if (!string.IsNullOrEmpty(EmailedCode))
            {
                EmailedCode = EmailedCode.Trim();
            }

            if (string.IsNullOrEmpty(EmailedCode))
            {
                LocalFunctions.AddError("Please enter emailed code", MethodBase.GetCurrentMethod(), false, false);
            }
            else
            {
                if (EmailedCode.Length != 10)
                {
                    LocalFunctions.AddError("Emailed code lenght should be 10", MethodBase.GetCurrentMethod(), false, false);
                }
            }
        }