Skip to content

Instantly share code, notes, and snippets.

@angelovstanton
Created February 19, 2017 12:12
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/5d0b9864b2705400078c72b12687d102 to your computer and use it in GitHub Desktop.
Save angelovstanton/5d0b9864b2705400078c72b12687d102 to your computer and use it in GitHub Desktop.
public partial class ShippingAddressPage
{
private readonly IWebDriver driver;
private readonly string url = @"http://www.amazon.com/shippingPage";
public ShippingAddressPage(IWebDriver browser)
{
this.driver = browser;
PageFactory.InitElements(browser, this);
}
// some other actions
private void FillAddressInfoInternal(ClientPurchaseInfo clientInfo)
{
this.Country.SelectByText(clientInfo.Country);
this.FullName.SendKeys(clientInfo.FullName);
this.Address.SendKeys(clientInfo.Address);
this.City.SendKeys(clientInfo.City);
this.Zip.SendKeys(clientInfo.Zip == null ? string.Empty : clientInfo.Zip);
this.Phone.SendKeys(clientInfo.Phone == null ? string.Empty : clientInfo.Phone);
this.Vat.SendKeys(clientInfo.Vat == null ? string.Empty : clientInfo.Vat);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment