public override OutcomePage EnterPostCodeAndSubmit(string postcode) { PostcodeField.Clear(); PostcodeField.SendKeys(postcode); PostcodeSubmitButton.Click(); return(new OutcomePage(Driver)); }
public void FillRegisterForm() { //Wait for Filling form WebDriverWait wait = new WebDriverWait(_driver, TimeSpan.FromSeconds(20)); wait.Until(pageLoaded => pageLoaded.FindElement(By.CssSelector(".std.box")).Displayed); //Fill the form GenderCheckboxLocator.Click(); FirstNameLocator.SendKeys(firstName); LastNameLocator.SendKeys(lastName); PasswordField.SendKeys(password); Address1Field.SendKeys(street); CityField.SendKeys(city); PostcodeField.SendKeys(postalCode); MobilePhoneField.SendKeys(mobilePhone); //Clear the last field and send new text IWebElement myAddress = _driver.FindElement(By.Id("alias")); myAddress.Clear(); myAddress.SendKeys("My address"); //Select from the dropdown list IWebElement element = StateDropdown; SelectElement select = new SelectElement(element); select.SelectByText("Alabama"); //Click Submitt Account SubmitAccountBtn.Click(); }
public void FillUserInformation(PracticeRegistrationModel user) { FirstNameField.SetText(user.FirstName); LastNameField.SetText(user.LastName); PasswordField.SetText(user.Password); AddressField.SetText(user.Address); CityField.SetText(user.City); SelectState.SelectByText(user.State); PostcodeField.SetText(user.Postcode); PhonenumberField.SetText(user.Phonenumber); RegisterButton.Click(); }
public Address(string line1, string line2, string postcode) { Line1 = new AddressLine(line1); Line2 = new AddressLine(line2); Postcode = new PostcodeField(postcode); }