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

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -