1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Python] How to get image of particular web element as base64

Discussão em 'Python' iniciado por Stack, Outubro 3, 2024 às 10:02.

  1. Stack

    Stack Membro Participativo

    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:)

    Continue reading...

Compartilhe esta Página