javascript - Protractor: Not able to retrieve all the values from multiple rows in a web-table -


i have web-table multiple rows. want retrieve data , verify. reason method return value first row. can 1 tell wrong?

method:

    validatepolicyversiontable(){        return element.all(by.repeater('row in table.filtered track table.idpropertyfn(row)')).then(numofrows=>{            let length = numofrows.length;            let tabledataarray = [];            (let = 0; < length; i++) {                let rows= element(by.repeater('row in table.filtered track table.idpropertyfn(row)').row(i));                let cells = rows.all(by.tagname('td'));                tabledataarray= cells.map(celltext=>{                   return celltext.gettext();                });            }            return tabledataarray;        })    } 

i this

validatepolicyversiontable() {    const rows = element.all(by.repeater('row in table.filtered track table.idpropertyfn(row)'));      return rows.map((row) => row.$$('td').gettext());  }

if fetching text of elementarrayfinder array of strings (the row.$$('td').gettext()). result this

[   ['row1celltext1', 'row1celltext2', 'row1celltext3'],   ['row2celltext1', 'row2celltext2', 'row2celltext3'],   ['row3celltext1', 'row3celltext2', 'row3celltext3'] ] 

Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -