Package pages
Class ShoppingCartPage
java.lang.Object
pages.ShoppingCartPage
Page Object Class for shopping cart Page
- Author:
- Nayeem John
-
Constructor Summary
ConstructorsConstructorDescriptionShoppingCartPage(com.microsoft.playwright.Page page, com.aventstack.extentreports.ExtentTest extentTest) Constructor to initialize the page objects with thePageinstance andExtentTestinstance -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckoutCart(boolean isUserLoggedIn) Method to checkout the cart with the product itemsbooleancheckProductInCart(List<String> products) Method to verify the product added to cart is available in cart
-
Constructor Details
-
ShoppingCartPage
public ShoppingCartPage(com.microsoft.playwright.Page page, com.aventstack.extentreports.ExtentTest extentTest) Constructor to initialize the page objects with thePageinstance andExtentTestinstance- Parameters:
page- -PageextentTest- -ExtentTest
-
-
Method Details
-
checkProductInCart
Method to verify the product added to cart is available in cart -
checkoutCart
public boolean checkoutCart(boolean isUserLoggedIn) Method to checkout the cart with the product items- Parameters:
isUserLoggedIn- -Boolean- User Login state- Returns:
- boolean - Returns true if checkout was successful else @throws
TimeoutErrorException
-