public CartPage goToCartPage() { browser.element(cssSelector("#shopping-cart a")).click(); return new CartPage(browser); }
public ProductsPage search(String keyword) { browser.element(id("keyword")).type(keyword); browser.element(id("search")).click(); return new ProductsPage(browser); }
public void displaysCartItemCount(int count) { browser .element(cssSelector("#shopping-cart")) .assertText(containsString(String.format("(%s)", valueOf(count)))); }
public PetStore logout() { browser.element(id("logout")).click(); return this; }