Skip to content

Instantly share code, notes, and snippets.

@angelovstanton
Created January 24, 2016 16:01
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/6913661bf4d02d05dbc3 to your computer and use it in GitHub Desktop.
Save angelovstanton/6913661bf4d02d05dbc3 to your computer and use it in GitHub Desktop.
public partial class PlaceOrderPage : BasePage
{
private readonly PurchaseTestInput purchaseTestInput;
public PlaceOrderPage(IWebDriver driver, PurchaseTestInput purchaseTestInput) : base(driver)
{
this.purchaseTestInput = purchaseTestInput;
}
public override string Url
{
get
{
return @"http://www.bing.com/";
}
}
public void ChoosePaymentMethod()
{
if (!string.IsNullOrEmpty(this.purchaseTestInput.CreditCardNumber)
&& !this.purchaseTestInput.IsWiretransfer
&& !(this.purchaseTestInput.IsPromotionalPurchase && this.purchaseTestInput.TotalPrice < 5)
&& !(this.purchaseTestInput.TotalPrice == 0))
{
this.CreditCard.SendKeys("371449635398431");
this.SecurityNumber.SendKeys("1234");
}
else
{
this.Wiretransfer.SendKeys("pathToFile");
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment