Validate tabular data against Excel Data

      No Comments on Validate tabular data against Excel Data


Map is a collection useful to store the things with a unique ID.Classes that implements Map are
HashTable,LinkedHashMap,HashMap,HashTable
.
The HashMap is unsorted and unordered Map and useful to store the null key as well.In this post we will focus on using HashMap for storing the values from the Excel and storing the values in another HashMap by reading the values using the automation tools like Selenium WebDriver. Comparing the two HashMap and display the results.

Real Time Example Scenario
Validate the stock prices displayed in the Rediff.com website
1. Read the data in the XLS file.
2. Store the data in HashMap1.
3. Read the data using Selenium Webdriver.
4. Store the data in HashMap2.
5. Compare the values stored in the two HashMaps.
Store the data in the XLS in rows and columns as mentioned below:

HDFC Bank
1,031.35

SBI
184.45

Create a Maven Project in Eclipse
Add the following dependencies in the pom.xml

Expected Result:
Comparison of HashMap is successful.

Leave a Reply

Your email address will not be published. Required fields are marked *