Hi,
I just discover in the samples/bbcshots.js the use of:
[code]
this.mouse.move("#promo2_carousel");
[/code]
but it's not documented on the casperjs website
I try to use it and it works good with this real example:
[code]
var casper = require('casper').create({
viewportSize: {width: 970, height: 600}
});
casper.then(function() {
this.mouse.move('li.first a');
this.wait(500, function() {
this.capture('capture-mouse-move.png');
});
});
casper.run();
[/code]
I first think that it's not documented because it's deprecated and replaced by the mouseEvent method.
But if I use it in my real example, the result is no more the same. The rollover seems not performed on the page.
[code]
var casper = require('casper').create({
viewportSize: {width: 970, height: 600}
});
casper.then(function() {
this.mouseEvent('mousemove', 'li.first a');
this.wait(500, function() {
this.capture('capture-mouve-event.png');
});
});
casper.run();
[/code]
So, my questions are simple:
- casper.mouse.move() is deprecated ?
- casper.mouseEvent('mousemove') is really equals to casper.mouse.move() ?
Thanks