Create a method to handle Amazon Mega Menu Links of categories. Method should be reusable and should have this signature:
public boolean click_mega_menu_shop_by_category(String category_name, String sub_category_name);
i.e. if I pass category name and sub category name in to the method, it should be able to click on the required link.
- Navigate to URL: amazon.in
- Mouse Over on <Shop By Category Link>
- Drop down will open, validate that drop down is displayed
- Mouse over on the category passed in the method.
- Sub category block opens up. validate the sub category pop up is displayed.
- Click on the sub_category_link passed in the method’s second argument.
- validate that the correct results are displayed.
Note:
Use Maven.
Use test ng for assertions
Use test ng reporter.log for logging.
try using extent