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(); }
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(); }
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(); }
public void FillForm(User user) { FirstName.SendKeys(user.FirstName); LastName.SendKeys(user.LastName); Password.SendKeys(user.Password); Days.Click(); DayOption.Click(); Months.Click(); MonthOption.Click(); Years.Click(); YearOption.Click(); Address.SendKeys(user.Address); City.SendKeys(user.City); State.Click(); StateOption.Click(); Zip.SendKeys(user.ZipCode); HomePhone.SendKeys(user.HomePhone); Mobile.SendKeys(user.MobilePhone); AddressAlias.Clear(); AddressAlias.SendKeys(user.AddressAlias); RegisterButton.Click(); }