According to Instant Testing with CasperJS:
casper.click()creates an event and sends it to the target event, but casper.mouse.click()has no relation to any element, but simply produces a mouse action at a given position.
, (HTML- w3schools.com , , JavaScript ).
. : , ! script, :
var casper = require('casper').create();
casper.options.viewportSize = {width: 1024,height: 768};
casper.start('http://www.w3schools.com/');
casper.then(function(){
this.mouse.click('a.btn');
});
casper.then(function(){
console.log('Location is now: ' + this.getCurrentUrl());
});
casper.run();
PhantomJS, SlimerJS. SlimerJS HTML-, . this.capture("aboutToClick.png"); , this.mouse.click('a.btn'); .
ASIDE: var mouse, , : casper .
source
share