Skip to content

Instantly share code, notes, and snippets.

@angelovstanton
Created March 19, 2017 17:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save angelovstanton/a54ecf307802012b084b760065124580 to your computer and use it in GitHub Desktop.
Save angelovstanton/a54ecf307802012b084b760065124580 to your computer and use it in GitHub Desktop.
public void PurchaseItem(
string itemUrl,
string itemPrice,
ClientLoginInfo clientLoginInfo,
ClientPurchaseInfo clientPurchaseInfo)
{
this.itemPage.Navigate(itemUrl);
this.itemPage.ClickBuyNowButton();
this.previewShoppingCartPage.ClickProceedToCheckoutButton();
this.signInPage.Login(clientLoginInfo.Email, clientLoginInfo.Password);
this.shippingAddressPage.FillShippingInfo(clientPurchaseInfo);
this.shippingAddressPage.ClickDifferentBillingCheckBox(clientPurchaseInfo);
this.shippingAddressPage.ClickContinueButton();
this.shippingPaymentPage.ClickBottomContinueButton();
this.shippingAddressPage.FillBillingInfo(clientPurchaseInfo);
this.shippingAddressPage.ClickContinueButton();
this.shippingPaymentPage.ClickTopContinueButton();
double totalPrice = double.Parse(itemPrice);
this.placeOrderPage.AssertOrderTotalPrice(totalPrice);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment