Selenium Real Time Scenario: Flipcart search product and find lowest and highest priced product

  • Open Url: https://www.flipkart.com (Do not Login) and validate the page is opened by checking the title and a page locator.
  • Search for TV and check search results is displayed.
  • Fetch all the products name and their price, save it in a Hash Map collection with key as Product name and value as price. Price should be integer. Example:  HashMap<String, Integer>
  • Print the Hash Map.
  • Print the Product which has the highest price.
  • Print the Product which has the lowest price

Note:

  • Use find element, find element to locate the objects in the page.
  • Use Maven and test ng to run the test.
  • Use reporter.log to log the steps.
  • Use test ng assert for validations.
  • No need to login in the application.