Grabbing <canvas> pixels through Selenium / Python Grabbing <canvas> pixels through Selenium / Python selenium selenium

Grabbing <canvas> pixels through Selenium / Python


Using Selenium you can query the canvas for its image data using Selenium's getEval method (ref) with some smartly designed js code.

You can do it pixel by pixel if that's what you want, or just grab the entire canvas using the toDataURL method.