Read data from Excel sheet using java
import java.io.FileInputStream;
import org.apache.poi.xssf.usermodel.
import org.apache.poi.xssf.usermodel.
import org.apache.poi.xssf.usermodel.
class Main {
public static void main(String[] args) {
// ReadFile
FileInputStream file = new FileInputStream(GlobalPath.
@SuppressWarnings("resource")
XSSFWorkbook wb = new XSSFWorkbook(file);
XSSFSheet sheet = wb.getSheet("Statuses");
int rowcount = sheet.getLastRowNum();
WebElement rowCount = driver.findElement(
Select sel = new Select(rowCount);
int count_of_options = sel.getOptions().size();
int FinalCount = count_of_options - 1;
System.out.println("The total no. of selectable options in the dropdown menu are =" + count_of_options);
ArrayList ExpectedStatus = new ArrayList();
//col no of sheet
int ColNo = Integer.valueOf(col);
System.out.println("Col:" + ColNo + " " + rowcount);
for (int i = 1; i <= FinalCount; i++) {
}
}
Comments
Post a Comment