page.evaluate( function() { // find element to send click to var element = document.querySelector( ‘span.control.critical.closer‘ ); // create a mouse click event var event = document.createEvent( ‘MouseEvents‘ ); event.initMouseEvent( ‘click‘, true, true, window, 1, 0, 0 ); // send click to element element.dispatchEvent( event ); });
nodejs phantom add click event,布布扣,bubuko.com
时间: 2024-10-19 04:39:59