Package pages

Class HomePage

java.lang.Object
pages.HomePage

public class HomePage extends Object
Page Object Class for Home Page
Author:
Nayeem John
  • Constructor Details

    • HomePage

      public HomePage(com.microsoft.playwright.Page page, com.aventstack.extentreports.ExtentTest extentTest)
      Constructor to initialize the page objects with the Page instance and ExtentTest instance
      Parameters:
      page - - Page
      extentTest - - ExtentTest
  • Method Details

    • getHomePageTitle

      public String getHomePageTitle()
      Method to retrieve the Home Page title
      Returns:
      String - Returns page title
    • searchProduct

      public boolean searchProduct(String productName)
      Method to search item in the portal for productName
      Parameters:
      productName - - Name of the product to search
      Returns:
      boolean - Returns true if search found results else false
    • addProductToCart

      public String addProductToCart()
      Method to add a product to the cart. Product will be added to cart and screenshot is taken
      Returns:
      String - Returns actual product catalog name