A slight correction - WWW::Mechanize::Firefox doesn't do a screenshot per se, it renders the page to a <canvas> HTML object and then transfers the canvas data back to Perl. But the dimensions of the resulting image are mostly determined by the size of the browser window still, so it is quite close to a screenshot still.