Using CasperJs, I am trying to do some testing on a canvas by capturing it and using canvas.toDataURL(); . However, there is no identifier on the canvas, the code looks something like this:
<div id= 'derp' ...> <canvas ...> </canvas> </div>
Can I get a canvas using something like
var canvas = document.getElementById(????);
or is there a better way to capture the canvas?
source share