I'm using Selenium web driver and Python to create automation scripts for web application testing. I need to implement verification that will compare two strings of encoded png files as base64: saved basic image and current image on page of same web element. There is a method in Selenium that allow to get page screenshot as base64 object
driver.get_screenshot_as_base64()
But how to get base64 screen of not the whole page, but just of particular image element on page without downloading it?
P.S. Other ways of comparing two images are acceptable also:)