Skip to content

Instantly share code, notes, and snippets.

@angelovstanton
Created February 19, 2017 12:13
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/4ba9b4604aa2121815b3db9cef3b54f9 to your computer and use it in GitHub Desktop.
Save angelovstanton/4ba9b4604aa2121815b3db9cef3b54f9 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 ?? string.Empty);
this.Phone.SendKeys(clientInfo?.Phone ?? string.Empty);
this.Vat.SendKeys(clientInfo?.Vat ?? string.Empty);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment