Error trying to write in the following row after every iteration (test suite).
How i can bind the row number?
I want to write the following row after every test suite iteration.
Here is the test case Im trying to implement and doesnt work because the type of
variable ‘RowVar’ Im trying to bind.
WebUI.openBrowser(URLs)
WebUI.delay(2)
TextOne = WebUI.getText(findTestObject(‘Page_Log in/h1_Welcome to’))
println(TextOne)
FileInputStream file = new FileInputStream(new File(‘F:\Testdata.xlsx’))
XSSFWorkbook workbook = new XSSFWorkbook(file)
XSSFSheet sheet = workbook.getSheetAt(0) // Get the first sheet.
‘Write data to excel’
sheet.createRow(RowVar) // New
sheet.getRow(RowVar).createCell(RowVar).setCellValue(TextOne)
file.close()
FileOutputStream outFile = new FileOutputStream(new File(‘F:\Testdata.xlsx’))
workbook.write(outFile)
outFile.close()
WebUI.closeBrowser()