Posts

Showing posts from 2017

Simple Java Code to read data from Excel file.

While learning selenium or working on automation project we encounter lot of scenarios where we need to read data from excel sheet.A typical scenario can be where we are using test data & we want to validate run time data with our test data , so in order to validate we need to compare this value we got from any function from run time with value we have already stored in our excel sheet.  For example we are working on a simple e-commerce application & we need to verify price of a product. Since you already know price of product you would have already saved that in test data file & you would like to test if price of product you are getting from your automated test is matching with what you have in stored in test data file. Precondition for this test is that you should have apache poi jars in class path. if not added please download latest jar from  https://poi.apache.org/download.html . or add maven dependency in pom.xml from  https:/...