0

I'm using nodejs selenium for my automation testing and stuck with my code and was not able to print the value of A1 cell which is "admin"

How could I print the value of my A1 cell?

var XLSX = require('xlsx');
var workbook = XLSX.readFile('DataDriven1.xlsx');
var sheet_name_list = workbook.SheetNames;
console.log(sheet_name_list.getCell('A1').value);
Joshua
  • 11
  • 1
  • 1

1 Answers1

0

You can get cell with indexes ;

for(var R = range.s.r; R <= range.e.r; ++R) {
  for(var C = range.s.c; C <= range.e.c; ++C) {
    var cell_address = {c:C, r:R};
    /* if an A1-style address is needed, encode the address */
    var cell_ref = XLSX.utils.encode_cell(cell_address);
  }
 }
EmreSURK
  • 419
  • 3
  • 13
  • Hi, thanks for the input. What I'm trying to achieve is on part of selenium where i need to get the cell value of i.e A1 = Rashmen and pass it to something like this...driver.findElement(By.name('q')).sendKeys(cell value A1); – Joshua Jun 01 '18 at 02:23