Robust browser automation for node.js