public void CreateCar(CarUiViewInfo viewInfo) { _driver.SendKeysWhenVisible(Registration, viewInfo.Registration); _driver.SendKeysWhenVisible(Make, viewInfo.Make); _driver.SendKeysWhenVisible(Model, viewInfo.Model); _driver.SendKeysWhenVisible(Year, viewInfo.Year); _driver.ClickElementWhenClickable(Save); }
public void WhenICreateANewCarForCustomerWithTheFollowingDetails(string customerName, Table table) { var values = table.Rows.Single(); _uiViewInfo = new CarUiViewInfo( values["Registration"], values["Make"], values["Model"], values["Year"]); _carMaintenancePage.CreateCar(_uiViewInfo); }
public void CreateCar(CarUiViewInfo viewInfo) { Driver.WaitForElement(Registration).SendKeys(viewInfo.Registration); var customerPicker = new CustomerPicker(Driver, Driver.FindElement(CustomerId)); customerPicker.SetValue(viewInfo.CustomerId); Driver.FindElement(Make).SendKeys(viewInfo.Make); Driver.FindElement(Model).SendKeys(viewInfo.Model); Driver.FindElement(Year).SendKeys(viewInfo.Year); Driver.FindElement(Save).Click(); }
public void WhenICreateANewCarForCustomerWithTheFollowingDetails(TransformedInt customerId, Table table) { var values = table.Rows.Single(); var uiViewInfo = new CarUiViewInfo( values["Registration"], customerId, values["Make"], values["Model"], values["Year"]); _carMaintenancePage.Open(); _carMaintenancePage.CreateCar(uiViewInfo); }
public void WhenICreateANewCarForCustomerWithTheFollowingDetails(string customerName, Table table) { var values = table.Rows.Single(); _uiViewInfo = new CarUiViewInfo( values["Registration"], values["Make"], values["Model"], values["Year"]); _actor.AttemptsTo( CreateCar.WithRegistration(_uiViewInfo.Registration) .AndMake(_uiViewInfo.Make) .AndModel(_uiViewInfo.Model) .ForYear(_uiViewInfo.Year)); }