HTMLElementObject.click()
, which is described here:
works on Safari/Chrome.
But in Casperjs:
➜ casperjs --version
1.0.0-RC1
➜ casperjs test.coffee
[info] [phantom] Starting...
[info] [phantom] Running suite: 2 steps
[debug] [phantom] opening url: /Users/linjunpop/Desktop/abc/test.html, HTTP GET
[debug] [phantom] Navigation requested: url=file:///Users/linjunpop/Desktop/abc/test.html, type=Other, lock=true, isMainFrame=true
[debug] [phantom] url changed to "file:///Users/linjunpop/Desktop/abc/test.html"
[info] [remote] START click
[info] [remote] [object HTMLHeadingElement]
[debug] [phantom] Successfully injected Casper client-side utilities
[info] [phantom] Step 2/2 file:///Users/linjunpop/Desktop/abc/test.html (HTTP 0)
[debug] [phantom] start page is loaded
[info] [phantom] Step 2/2: done in 211ms.
[info] [phantom] Done 2 steps in 308ms
Also, with
zombie.js
http://zombie.labnotes.org/Run: