By using below mentioned code i have successfully fetched the data from excel but while passing in textbox of website it is showing error…

public static void xlsdatafetch()
XLSDatatable_Connectivity data= new XLSDatatable_Connectivity (System.getProperty(“user.dir”) +”\\src\\Excel\\CreateUser.xlsx”);
int rows= data.totalRow(“CreateUser”);
int column= data.totalColumn(“CreateUser”);


Object obj[][]=new Object[rows-1][column];

for(int row=2; row<=rows;row++)
for(int col=0;col<column;col++)
obj[row-2][col]= data.getData(“CreateUser”, col, row);

driver.findElement(By.xpath(“//*[@id=’oUsersInfo_Name’]”)).setData(obj[0][2]); // I am getting error at this line….

Default Asked on April 23, 2017 in Selenium WebDriver.
Add Comment
  • 0 Answer(s)
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.