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