News for hackers. Stuff that matters.
Re:Nightwatch.js by hesslau_ on Friday January 31, 2014 @09:21AM (#7156706)
Offtopic:

the line

> .waitForElementVisible("button[name=btnG]", 1000)

in the demo test caught my attention - what is a good way to achieve this in production code? i.e. execute a function when a certain element which matches the query becomes visible?

atm i'm using the DOMNodeInserted event (debounced)

> $(document).on('DOMNodeInserted', _.debounce(function(e, ui) {}, 100);

Re:Nightwatch.js by MDCore on Friday January 31, 2014 @11:26AM (#7157422)
Take a look at Mutation Observers. The only problem might be browser support: http://caniuse.com/#search=MutationObserver