コード例 #1
0
        public void FillRegistrationForm(UserModel user)
        {
            Gender[(int)AutomationPractice.Gender.Female].Click();

            FirstName.SendKeys(user.FirstName);
            LastName.SendKeys(user.LastName);
            Password.SendKeys(user.Password);

            var date = new SelectElement(DayDateDropDown.WrappedElement);

            date.SelectByValue(user.Day);

            var month = new SelectElement(MonthDateDropDown.WrappedElement);

            month.SelectByValue(user.Month);

            var year = new SelectElement(YearDateDropDown.WrappedElement);

            year.SelectByValue(user.Year);

            Address.SendKeys(user.Address);
            City.SendKeys(user.City);
            Postcode.SendKeys(user.PostCode);
            PhoneMobile.SendKeys(user.Phone);

            var state = new SelectElement(StateDropDown.WrappedElement);

            state.SelectByText(user.State);
        }
コード例 #2
0
 public void FillForm(AutomationPracticeFromModel user)
 {
     SignInButton.Click();
     WaitForLoad();
     EmailSectionOnCheateAccount.Click();
     FillEmail(user);
     WaitForLoad();
     CreateAccountButton.Click();
     WaitForLoad();
     LastNamePanel.SendKeys(user.LastNamePanel + Keys.Tab);
     FirstNamePanel.SendKeys(user.FirstNamePanel + Keys.Tab);
     PasswordPanel.SendKeys(user.PasswordPanel + Keys.Tab);
     AddressPanel.SendKeys(user.AddressPanel + Keys.Tab);
     CityPanel.SendKeys(user.CityPanel + Keys.Tab);
     IdStatePanel.SendKeys(user.IdStatePanel + Keys.Tab);
     PhoneMobile.SendKeys(user.PhoneMobile + Keys.Tab);
     PosteCodePanel.SendKeys(user.PosteCodePanel + Keys.Tab);
 }
コード例 #3
0
        public void FillForm(PracticeFormModel user)
        {
            Gender(user.Gender).Click();
            FirstName.SendKeys(user.FirstName);
            LastName.SendKeys(user.LastName);
            Password.SendKeys(user.Password);
            Day.SendKeys(user.Day);
            Month.SelectByValue(user.Month);
            Year.SendKeys(user.Year);
            CompanyName.SendKeys(user.CompanyName);
            Address.SendKeys(user.Address);
            City.SendKeys(user.Address);
            State.SelectByValue(user.State);
            PostCode.SendKeys(user.PostCode);
            Phone.SendKeys(user.Phone);
            PhoneMobile.SendKeys(user.PhoneMobile);
            Alias.SendKeys(user.Alias);

            Submit.Click();
        }