-
Book Overview & Buying
-
Table Of Contents
-
Feedback & Rating
Selenium Testing Tools Cookbook Second Edition
By :
To maintain test cases and test data, Microsoft Excel is the favorite tool used by testers. Compared to the CSV file format, Excel gives numerous features and a structured way to store data. A tester can create and maintain tables of test data in an Excel spreadsheet easily.
In this recipe, we will use an Excel spreadsheet as your data source. We will use the Apache POI API, developed by the Apache Foundation, to manipulate the Excel spreadsheet. This recipe also implements some negative test handling.
To begin, follow these steps:
Add OpenCSV dependency to the Maven pom.xml file:
<dependency> <groupId>com.opencsv</groupId> <artifactId>opencsv</artifactId> <version>3.4</version> <scope>test</scope> </dependency>
Prepare an Excel spreadsheet with the required data
We will also need a SpreadsheetData helper class to read the Excel spreadsheets. This is...
Change the font size
Change margin width
Change background colour