public ShoppingCartAddressPage ProceedToCheckOut() { proceedToCheckOutButton.Click(); ShoppingCartAddressPage shoppingCartAddressPage = new ShoppingCartAddressPage(); return(shoppingCartAddressPage); }
public void Buy(int amountToBuy) { DressesPage dressesPage = new DressesPage(); dressesPage.AddToCart(); ShoppingCartSummaryPage shoppingCartSummaryPage = dressesPage.ProceedToCheckOut(); shoppingCartSummaryPage.AddQty(amountToBuy); TotalOrder = shoppingCartSummaryPage.GetTotal(); ShoppingCartAddressPage shoppingCartAddressPage = shoppingCartSummaryPage.ProceedToCheckOut(); ShoppingCartShippingPage shoppingCartShippingPage = shoppingCartAddressPage.ProceedToCheckOut(); shoppingCartShippingPage.AcceptTerms(); ShoppingCartPaymentPage shoppingCartPaymentPage = shoppingCartShippingPage.ProceedToCheckOut(); Confirm confirm = shoppingCartPaymentPage.PayByBank(); Order orderToBuy = confirm.ConfirmOrderToBuy(); TotalPaid = orderToBuy.GetAmount(); }