I am using keyword driven framework to create the script in selenium.Any one please provide me script how to write the data into excel sheet with proper column names. Suppose once the customer is created then it will create one customer id so i want to save this customer id in output.xls file with mobile number for each customer registration one by one,if i run for 100 test data records it should save 100 customers customer id with mobile number.Any one please help me in this once.
@Lyndon, Completely agree. @Rajesh, Its not the area of Selenium. Its open source framework for web-automation and now they have extension of it for mobile platform called as Appium.
Not possible using Selenium!
Selenium doesn't provide any functionality to deal with Excel documents, however assuming you're using Java you can read and write Excel files using Apache POI library
Workbook wb = new HSSFWorkbook(); CreationHelper createHelper = wb.getCreationHelper(); Sheet sheet = wb.createSheet("Sheet1"); Row row = sheet.createRow(0); Cell cell = row.createCell(0); cell.setCellValue(createHelper.createRichTextString("Hello world")); FileOutputStream fileOut = new FileOutputStream("workbook.xls"); wb.write(fileOut); fileOut.close();