I would like to know, do we use Apache POI when interacting with Excel Files for Selenium Webdriver (under JUnit framework) or is there any better approach?
Let me know if further clarity is required.
I guess this link should answer all your questions.
Yes, you can use Apache POI for interacting with Excel Files for Selenium WebDriver (under JUnit framework). You can also use TestNG instead of JUnit if anybody wants.
The following things can be done by using Apache POI:
i) Reading data from Excel (both .xls and .xlsx) ii) Writing data to Excel (both .xls and .xlsx)
You can also use JExcel for reading and writing in Excel. But the limitation is that it doesn't support .xlsx format