.click()
is not standard. You need to create an event and dispatch it:
function click(el){
var ev = document.createEvent("MouseEvent");
ev.initMouseEvent(
"click",
true /* bubble */, true /* cancelable */,
window, null,
0, 0, 0, 0, /* coordinates */
false, false, false, false, /* modifier keys */
0 /*left*/, null
);
el.dispatchEvent(ev);
}
Related Contents:
- How do I detect a click outside an element?
- jQuery click events firing multiple times
- CasperJS/PhantomJS doesn’t load https page
- How do I programmatically click a link with javascript?
- Can I call jQuery’s click() to follow an link if I haven’t bound an event handler to it with bind or click already?
- phantomjs not waiting for “full” page load
- $(document).click() not working correctly on iPhone. jquery [duplicate]
- Detect click on HTML button through javascript in Android WebView
- adding ‘click’ event listeners in loop [duplicate]
- Why is this jQuery click function not working?
- How can I scrape pages with dynamic content using node.js?
- Improving performance of click detection on a staggered column isometric grid
- HTML “overlay” which allows clicks to fall through to elements behind it [duplicate]
- Need to cancel click/mouseup events when double-click event detected
- Triggering a JavaScript click() event at specific coordinates
- Pass arguments with page.evaluate
- What the difference between .click and .change on a checkbox [duplicate]
- CasperJS bind issue
- How to stop default link click behavior with jQuery
- jQuery click anywhere in the page except on 1 div
- How to scroll down with Phantomjs to load dynamic content
- How to submit a form using PhantomJS
- How can I detect visited and unvisited links on a page?
- Using Multiple page.open in Single Script
- How to add click event to an element?
- Close/hide an element when clicking outside of it (but not inside)
- Javascript Detect click event outside of div [duplicate]
- Jquery: mousedown effect (while left click is held down)
- jQuery: keyup event for mobile device
- How do I click on this button with Greasemonkey?
- Save and render a webpage with PhantomJS and node.js
- how to wait for element visibility in phantomjs
- Difference between .click() and actually clicking a button? (javascript/jQuery)
- JavaScript: Invoking click-event of an anchor tag from javascript
- How to render part of a page with PhantomJS?
- Looping over urls to do the same thing
- Uncaught ReferenceError: Invalid left-hand side in assignment
- can phantomjs work with node.js?
- how to Execute PhantomJS from PHP
- javascript click event handler fires without clicking
- Why I am not able to render my ReactJS application using PhantomJS 2.1.1?
- How do I get Greasemonkey to click on a button that only appears after a delay?
- Why doesn’t this.evaluate return DOM nodes correctly?
- How to remove all click event handlers using jQuery?
- Programmatical click on -tag not working in Firefox
- How do I access an iframe from CasperJS?
- jQuery scroll() detect when user stops scrolling
- Stop a youtube video with jquery?
- JS Events: hooking on value change event on text inputs
- How to convert array of png image data into video file