Comment on Nightwatch.jsComments−hesslau_12yOfftopic: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);−MDCore12yTake a look at Mutation Observers. The only problem might be browser support: http://caniuse.com/#search=MutationObserver
Comments
Offtopic:
the line
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)
Take a look at Mutation Observers. The only problem might be browser support: http://caniuse.com/#search=MutationObserver