Skip to content

Instantly share code, notes, and snippets.

Embed
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
You can’t perform that action at this time.