public ContactFormPage FillinFields(ContactFormModel contactForm) { FirstNameField.SendKeys(contactForm.FirstName); LastNameField.SendKeys(contactForm.LastName); CountrySelect.SendKeys(contactForm.Country); SubjectField.SendKeys(contactForm.Subject); return(this); }
public OfferMPPViewModel(Entities.Country country, IMPPService mppService, IWalletService walletService) { Info = new CountryInfoViewModel(country); CountrySelect = Select2AjaxViewModel.Create <CountryController>(c => c.GetMPPAvailableCountries(null, 0), "OtherCountryID", null, ""); CountrySelect.AddAdditionalData("countryID", country.ID); MinimumLength = ConfigurationHelper.Configuration.MinimumMPPLength; MaximumLength = ConfigurationHelper.Configuration.MaximumMPPLength; CountryGold = walletService.GetWalletMoney(country.Entity.WalletID, GameHelper.Gold.ID).Amount; GoldImage = Images.GetCountryCurrency(GameHelper.Gold).VM; }
public void FillRegistrationForm(UserRegistration user) { Type(FirstName, user.FirstName); Type(LastName, user.LastName); ClickElements(MartialStatus, user.MartialStatus); ClickElements(Hobbys, user.Hobbys); CountrySelect.SelectByText(user.Country); BirthMonthSelect.SelectByText(user.BirthMonth); BirthDaySelect.SelectByText(user.BirthDay); BirthYearSelect.SelectByText(user.BirthYear); Type(Phone, user.Phone); Type(UserName, user.UserName); Type(Email, user.Email); UploadPicture.Click(); Driver.SwitchTo().ActiveElement().SendKeys(Path.GetFullPath(user.ProfilePicture)); Type(AboutYourself, user.AboutYourself); Type(Password, user.Password); Type(ConfirmPassword, user.ConfirmPassword); SubmitButton.Click(); }
static void Main(string[] args) { // instantiate vending machines CandyVendingMachine CandyVM = new CandyVendingMachine(); ClothingVendingMachine ClothingVM = new ClothingVendingMachine(); CoffeeVendingMachine CoffeeVM = new CoffeeVendingMachine(); EnergyDrinkVendingMachine EnergyVM = new EnergyDrinkVendingMachine(); PreparedFoodVendingMachine PreparedFoodVM = new PreparedFoodVendingMachine(); SodaVendingMachine SodaVM = new SodaVendingMachine(); SundryVendingMachine SundryVM = new SundryVendingMachine(); // instantiate products // candy products Snickers snickers = new Snickers() { Name = "Snickers Bar", Price = 1.99 }; snickers.Ingredients = "chocolate and some other stuff"; snickers.Recyclable = false; // add product to specific vending machine CandyVM.AddProduct(snickers); // clothing items Shoes sandals = new Shoes() { Name = "Rainbow Flip-flops", Price = 80.00 }; sandals.LvlSpicy = 1; sandals.Organic = true; // add product to specific vending machine ClothingVM.AddProduct(sandals); // coffee products SpanishCoffee spanishCoffee = new SpanishCoffee() { Name = "Spanish Coffee Cocktail", Price = 10.00 }; spanishCoffee.LvlSpicy = 4; spanishCoffee.Organic = false; // add product to specific vending machine CoffeeVM.AddProduct(spanishCoffee); // energy drinks Toughman toughman = new Toughman() { Name = "Tougman", Price = 2.85 }; toughman.Colors = "yellow 2, red 4"; toughman.RfIdFrequency = "3.16MgHz"; // add product to specific vending machine EnergyVM.AddProduct(toughman); // prepared foods KrystalSlider sliders = new KrystalSlider() { Name = "Krystal Sliders", Price = 5.00 }; sliders.Ingredients = "who knows"; sliders.Recyclable = false; // add product to specific vending machine PreparedFoodVM.AddProduct(sliders); // soda drinks Coke coke = new Coke() { Name = "Coca Cola", Price = 1.99 }; coke.Ingredients = "water, sugar, brown"; coke.Recyclable = true; // add product to specific vending machine SodaVM.AddProduct(coke); /* * WELCOME TO VENIGO * - the vending game - * created by Sam Cronin */ PlayerInput intro = new PlayerInput(); PlayerInput vendingOption = new PlayerInput(); CountrySelect country = new CountrySelect(); VendingSelect vending = new VendingSelect(); Console.WriteLine($@" ------------------ WELCOME TO VENDIGO! ------------------ 1. Japan 2. Spain 3. United States 4. Display Reports 5. Exit Choose a country.."); // store the users input intro.StoreInputHere = Console.ReadLine().ToLower(); // if users input equals this do this if (intro.StoreInputHere == "japan") { country.Japan(); } if (intro.StoreInputHere == "spain") { country.Spain(); } if (intro.StoreInputHere == "united states") { country.America(); } vendingOption.StoreInputHere = Console.ReadLine().ToLower(); if (vendingOption.StoreInputHere == "soda") { vending.Soda(); } // if (vendingOption.StoreInputHere == "candy") // { // vending.Candy(); // } // if (vendingOption.StoreInputHere == "sundry") // { // vending.Sundry(); // } // if (vendingOption.StoreInputHere == "coffee") // { // vending.Coffee(); // } // if (vendingOption.StoreInputHere == "clothing") // { // vending.Clothing(); // } // if (vendingOption.StoreInputHere == "prepared foods") // { // vending.PreparedFood(); // } // if (vendingOption.StoreInputHere == "energy drinks") // { // vending.EnergyDrinks(); // } }