Package pages
Class ProductPage
java.lang.Object
pages.ProductPage
Page Object Class for Product Page
- Author:
- Nayeem John
-
Constructor Summary
ConstructorsConstructorDescriptionProductPage
(com.microsoft.playwright.Page page, com.aventstack.extentreports.ExtentTest extentTest) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Method to sort the products by price from UI and verify the sorting from code Using playwright selectOption to select drop down.boolean
shareProductToSocialPlatform
(String socialPlatformName, int retryAttempt) Method to share the product to the social platform and verify the share count is incrementedvoid
viewProduct
(String productName) Method to click and view the product item from product list
-
Constructor Details
-
ProductPage
public ProductPage(com.microsoft.playwright.Page page, com.aventstack.extentreports.ExtentTest extentTest)
-
-
Method Details
-
checkProductSortedByPrice
public boolean checkProductSortedByPrice()Method to sort the products by price from UI and verify the sorting from code Using playwright selectOption to select drop down. The value from drop down is selected based on elementHandle of text locator- Returns:
- boolean - Returns the verification of result of sorting -
Boolean
-
viewProduct
Method to click and view the product item from product list- Parameters:
productName
- -String
-