I am new to Selenium and trying to write a program to extract values from excel file. My data is in the first sheet in the 1st column. I see the getCellType()
and getCellEnum()
both are depreciated and will get a fix in POI 4.0. Till that time the fix is available, what is the way I can extract the cell values and then compare the value in the Web application. The cell data can be int or String.
Asked
Active
Viewed 146 times
0
-
I had checked the post at http://stackoverflow.com/questions/39993683/alternative-to-deprecated-getcelltype, but still quite did understand how I resolve the issue as I am still new and learnng.. Also Cell.CELL_TYPE_NUMERIC and CELL_TYPE_STRING is depreciated. Probably – VLearner Nov 01 '16 at 18:58
-
Below is the code I wrote: – VLearner Nov 01 '16 at 19:09
-
Iterator
ir = sh.iterator(); //sh is sheet Iterator
– VLearner Nov 01 '16 at 19:22it = list1.iterator();// List in web app Row rowpointer = ir.next(); while (ir.hasNext()) {// iterating over ethe rows in the excel rowpointer = ir.next(); Iterator c1 = rowpointer.iterator(); while (c1.hasNext()) { Cell cell = c1.next(); RichTextString rs1 = cell.getRichStringCellValue(); while (it.hasNext()) { WebElement we = it.next(); String ex1 = we.getText(); if (rs1.getString().equals(ex1)) { we.click(); it = list1.iterator(); break; }}}} what if cells type was not known ? |