How to log an element using protractor? -


i'm trying locate element using protractor can't find it. debug, i'd @ element did find , see 1 is. have code this:

      myelement.all(by.csscontainingtext('.name', 'value')).then(function (elems) {     console.log(elems.length); <--- line logs "2"     console.log(elems[1]); <--- line logs "{ ptor_: ...."     elems[1].getinnerhtml().then(function(html){         console.log(html); <--- never gets here     }); }); 

how can see elements all() method found?

not sure if it's best/most concise way, should able use map loop on elements, , use getouterhtml() on each access html

myelement.all(by.csscontainingtext('.name', 'value')).map(function(el) {   return el.getouterhtml(); }).then(function(html) {   console.log(html); }); 

Comments

Popular posts from this blog

java - Spring Data JPA: Why findOne(id) executing delete query internally? -

python - Mongodb How to add addtional information when aggregating? -

java - Incorrect order of records in M-M relationship in hibernate -