public void CompleteCheckoutFormAndSubmit(ModelFormCheckOutPage model) { EmailTextBox.SendKeysWithWait(model.EmailID); NameTextBox.SendKeysWithWait(model.Name); AddressTextBox.SendKeysWithWait(model.Name); CardTypeDropdownMenu.SendKeysWithWait(model.CardType); CardNumberTextBox.SendKeysWithWait(model.CardNumber.ToString()); CardHolderNameTextBox.SendKeysWithWait(model.CardHoldName); VerificationCodeTextBox.SendKeysWithWait(model.VerificationCode.ToString()); PlaceOrderButton.ClickWithWait(); }
public static ModelFormCheckOutPage BuildCheckOutDetails(CardType cardType) { var fullName = Faker.Name.FullName(); //var cardType = CardType; var model = new ModelFormCheckOutPage() { EmailID = Faker.Internet.Email(fullName), Name = fullName, Address = Faker.Address.City(), CardType = EnumHelper.GetnumDescription(cardType), CardNumber = Faker.RandomNumber.Next(10000000, 99999999).ToString() + Faker.RandomNumber.Next(10000000, 99999999), CardHoldName = Faker.Name.FullName(), VerificationCode = Faker.RandomNumber.Next(100, 999) }; return(model); }