Created
January 24, 2016 16:01
-
-
Save angelovstanton/6913661bf4d02d05dbc3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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