Capturing <canvas> pixels via Selenium / Python

I do automation on the side. I would like to somehow interact with the HTML page through Python code and access the pixel data. What options does Selenium offer for its approaches?

Possible considerations

  • Access raw pixel data in working memory

  • Get pixels by saving them in a local image file (PNG)

  • Get the pixels by storing them in memory, listening to the port on the local host and pushing the AJAX data there

  • Creating an image file and accessing it directly in working memory

+5
source share
1 answer

Selenium, , Selenium getEval (ref) js-.

, , , toDataURL.

+2

All Articles