Skip to content

Instantly share code, notes, and snippets.

Created April 30, 2020 14:54
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
How to decrease automation page objects using composition
public class HeaderComponent {
//All of the things related to the Header go here
//Elements related to the header section
//Methods to interact with the header
public class IndividualItemComponent {
public void addToCart(ItemType itemType)
//actions to add the item to the cart
public class InventoryCollectionComponent {
IndividualItemComponent item;
public class InventoryPage {
HeaderComponent header;
InventoryCollectionComponent inventoryCollection;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment