karma runner - How to log/dump/outout dom html -


i've tried:

console.log(element('.users').html()); 

but thing

log: { name: 'element \'.users\' html', fulfilled: false } 

i assume using angular scenario runner.

the element().html() dsl returns future (see wikipedia). logging future contain element, @ point when calling console.log, future not resolved yet - there no value in there.

try this:

element('.users').query(function(elm, done) {   console.log(elm.html());   done(); }); 

the whole scenario runner works queue. test code executed (synchronously) , each command (eg. element().html in case) adds action queue. then, these actions executed asynchronously - once first action finishes (by calling done()), second action executed, etc... therefore individual actions can asynchronous, test code synchronous, more readable.


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -