public CartPage goToCartPage() { browser.element(cssSelector("#shopping-cart a")).click(); return new CartPage(browser); }
public ReceiptPage goToReceiptPage(String orderNumber) { browser.navigate().to(url("/orders/" + orderNumber)); return new ReceiptPage(browser); }
public void displaysCartItemCount(int count) { browser .element(cssSelector("#shopping-cart")) .assertText(containsString(String.format("(%s)", valueOf(count)))); }
public ProductsPage search(String keyword) { browser.element(id("keyword")).type(keyword); browser.element(id("search")).click(); return new ProductsPage(browser); }
public PetStore goToHomePage() { browser.navigate().to(url("/")); return this; }
public PetStore logout() { browser.element(id("logout")).click(); return this; }
private void stopBrowser() { browser.quit(); }