Get Number of element returned by findAllByXpath in leadfoot

165 Views Asked by At

How to get the count of the element returned bythis.remote.findAllByXpath() in intern js (leadfoot).

1

There are 1 best solutions below

2
epascarello On BEST ANSWER

I just played with leadfoot so not an expert but wouldn't it be something like this?

foo.findAllByXpath('/html/body/div')
    .then(function (rows) {
        console.log(rows.length);
    });