PhantomJS または SlimerJS を使用して Web サイトのキャンバス要素を自動化しようとしています。キャンバス要素でクリック ボタンを検出するのに苦労しています。スクリーン ショットから、マウスがボタンの上に置かれていることがわかりますが、ボタンをクリックすることは拒否されます。
var page = require('webpage').create()
page.viewportSize={width: 1280, height: 768};
var fs = require('fs');
page.open('http://www.soulofsoccer.com/app/',function(){
setTimeout(function(){ //wait for canvas to load
page.render('soccer/step1.png','png');
page.sendEvent("click",50,718); //menu button
//test to click a second time
setTimeout(function(){
page.sendEvent("click",50,718);
page.render('soccer/test1.png','png');
},1000);
//final screenshot
setTimeout(function(){
page.render('soccer/test.png','png');
//phantom.exit();
//slimer.exit();
},2000);
},10000); //wait for canvas to load
});
誰かが私のエラーがどこにあるかを教えてもらえますか?
PhantomJS バージョン: 1.9.8
SlimerJS バージョン: 0.9.5