Search code examples
javascriptarrayspromiseinternleadfoot

Get Number of element returned by findAllByXpath in leadfoot


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


Solution

  • 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);
        });