Unable to put data in appium using excel

147 Views Asked by At

Below is the code I am using:

 @Test 
 public void excel() throws JXLException, IOException  
{

 String FilePath = "C://Users//QA Rahul Singh//Desktop//dat.xls";
 FileInputStream fs = new FileInputStream(FilePath);
Workbook wb = Workbook.getWorkbook(fs);
Sheet wrksheet = wb.getSheet(0);
 String data = wb.getCell("A1").getContents();
 driver.findElement(By.id("inputUsername")).sendKeys(data);
 driver.findElement(By.id("btnRegisterUser")).click();  

 }
0

There are 0 best solutions below