public void PopulatePageAndSubmit() { FirstName.SendKeys("Miller"); LastName.SendKeys("John"); UserEmail.SendKeys("*****@*****.**"); Gender.Click(); MobileNumber.SendKeys("0751123456"); DateOfBirth.Click(); Month.Click(); Year.Click(); Day.Click(); Subjects.SendKeys("Test subjects"); Thread.Sleep(2000); Hobbies.Click(); ((IJavaScriptExecutor)_driver).ExecuteScript("arguments[0].scrollIntoView(true);", Picture); //Thread.Sleep(5000); //Picture.Click(); CurrentAddress.SendKeys("Str. 13 Dec"); Thread.Sleep(2000); StateDropDown.Click(); StateOption.Click(); CityDropDown.Click(); CityOption.Click(); Submit.Click(); }
public BillingOrderPage ClickStateOption(State state) { CustomTestContext.WriteLine($"Click state option - '{state}'"); StateOption = Driver.FindElement(By.XPath(STATE_OPTION.Replace("{code}", state.ToString()))); StateOption.Click(); return(this); }
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(); }