Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
A test that shows how to use composition
public class CompositionTest
public void aTestUsingComposition() {
InventoryPage inventoryPage = new InventoryPage(driver);;
//If you want to interact with the header
HeaderComponent header = new HeaderComponent(driver);"backpack");
//If you want to interact with items on the page
InventoryCollectionComponent collection = new InventoryCollectionComponent(driver);
//Here is us using composition to reference an Item inside of the Collection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment