コード例 #1
0
        public void FillRegistrationForm(RegistrationUser user)
        {
            Type(FirstName, user.FirstName);
            Type(LastName, user.LastName);
            ClickOnElements(MartialStatus, user.MatrialStatus);
            ClickOnElements(Hobbys, user.Hobbys);
            CountryOption.SelectByText(user.Country);
            MounthOption.SelectByText(user.BirthMonth);
            DayOption.SelectByText(user.BirthDay);
            YearOption.SelectByText(user.BirthYear);
            Type(Phone, user.Phone);
            Type(UserName, user.UserName);
            Type(Email, user.Email);

            if (user.Picture != null || user.Picture != string.Empty)
            {
                UploadButton.Click();
                Driver.SwitchTo().ActiveElement().SendKeys(user.Picture);
            }

            Type(Description, user.Description);
            Type(Password, user.Password);
            Type(ConfirmPassword, user.ConfirmPassword);
            SubmitButton.Click();
        }
コード例 #2
0
 public void FillRegistrationForm(RegistrationUser user)
 {
     Type(FirstName, user.FirstName);
     Type(LastName, user.LastName);
     FillManyOptionElements(MatrialStatus, user.MatrialStatus);
     FillManyOptionElements(Hobbies, user.Hobbies);
     CountryOption.SelectByText(user.Country);
     MonthOption.SelectByValue(user.Month);
     DayOption.SelectByText(user.Day);
     YearOption.SelectByValue(user.Year);
     Type(Phone, user.Phone);
     Type(UserName, user.UserName);
     Type(Email, user.Email);
     UploadPicButton.Click();
     _driver.SwitchTo().ActiveElement().SendKeys(user.PicturePath);
     Type(Description, user.Description);
     Type(Password, user.Password);
     Type(ConfirmPassword, user.ConfirmPassword);
     SubmitButton.Click();
 }
コード例 #3
0
 public void FillRegistrationForm()
 {
     Type(FirstName, "Ventsislav");
     Type(LastName, "Ivanov");
     this.MatrialStatus.Click();
     this.Hobbies[0].Click();
     this.Hobbies[1].Click();
     CountryOption.SelectByText("Bulgaria");
     MonthOption.SelectByValue("3");
     DayOption.SelectByText("3");
     YearOption.SelectByValue("1989");
     Type(Phone, "359999999999");
     Type(UserName, "BatmanForever");
     Type(Email, "*****@*****.**");
     UploadPicButton.Click();
     Driver.SwitchTo().ActiveElement().SendKeys(Path.GetFullPath(@"..\..\..\logo.jpg"));
     Type(Description, "I think I'm Ready with this test!");
     Type(Password, "123456789");
     Type(ConfirmPassword, "123456789");
     SubmitButton.Click();
 }
コード例 #4
0
 public void FillForm(RegistrationUser user)
 {
     RadioButton.Click();
     FirstName.SendKeys(user.FirstName);
     LastName.SendKeys(user.LastName);
     Email.Clear();
     Email.SendKeys(user.Email);
     Password.SendKeys(user.Password);
     DaysOption.SelectByIndex(user.DateOfBirth.Day);
     MonthsOption.SelectByIndex(user.DateOfBirth.Month);
     YearsOption.SelectByValue(user.DateOfBirth.Year.ToString());
     SignUpNewsletter.Click();
     Address_FirstName.SendKeys(user.Address.FirstName);
     Address_LastName.SendKeys(user.Address.LastName);
     Address_Address1.SendKeys(user.Address.Address1);
     Address_City.SendKeys(user.Address.City);
     StateOption.SelectByText(user.Address.State);
     Address_ZipCode.SendKeys(user.Address.ZipCode.ToString());
     CountryOption.SelectByText(user.Address.Country);
     Address_Info.SendKeys(user.Address.Info);
     Address_MobPhone.SendKeys(user.Address.MobPhone);
     RegisterButton.Click();
 }