Skip to content

Instantly share code, notes, and snippets.

@executeautomation
Last active November 5, 2018 21:34
Show Gist options
  • Save executeautomation/d46988bdd3e238a3e0a5763e36afd7ca to your computer and use it in GitHub Desktop.
Save executeautomation/d46988bdd3e238a3e0a5763e36afd7ca to your computer and use it in GitHub Desktop.
public class AmazonHomePage
{
[FindBy(How = How.Id, Using="HomeDiv")]
public IWebElement element1;
[FindBy(How = How.Id, Using="HomeDiv")]
public IWebElement element2;
[FindBy(How = How.Id, Using="HomeDiv")]
public IWebElement element3;
[FindBy(How = How.Id, Using="HomeDiv")]
public IWebElement element4;
//This will give you objects of Product Div
public int AmazonProductDivHomePage { get; set; }
//This will give you object of Cart Div
public int AmazonCartDivHomePage { get; set; }
public AmazonCartDivHomePage NavigateCartPage()
{
return new AmazonCartDivHomePage();
}
}
public class AmazonProductDivHomePage
{
[FindBy(How = How.Id, Using="HomeDiv")]
public IWebElement DivElement1;
[FindBy(How = How.Id, Using="HomeDiv")]
public IWebElement DivElement2;
[FindBy(How = How.Id, Using="HomeDiv")]
public IWebElement DivElement3;
}
public class AmazonCartDivHomePage
{
[FindBy(How = How.Id, Using="HomeDiv")]
public IWebElement DivElement1;
[FindBy(How = How.Id, Using="HomeDiv")]
public IWebElement DivElement2;
[FindBy(How = How.Id, Using="HomeDiv")]
public IWebElement DivElement3;
}
@executeautomation
Copy link
Author

Example for linkedIn

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment