Skip to main content

ImageCompare Library for Robot Framework®

A library for simple screenshot comparison. Supports image files like .png and .jpg.

Image Parts can be ignored via simple coordinate masks or area masks.

See Keyword Documentation for more information.

Install robotframework-imagecompare

Installation via pip

  • pip install --upgrade robotframework-imagecompare

Examples

Check the /atest/Compare.robot test suite for some examples.

Testing with Robot Framework

*** Settings ***
Library    ImageCompare

*** Test Cases ***
Compare two Images and highlight differences
    Compare Images    Reference.jpg    Candidate.jpg

Use masks/placeholders to exclude parts from visual comparison

*** Settings ***
Library    ImageCompare

*** Test Cases ***
Compare two Images and ignore parts by using masks
    Compare Images    Reference.jpg    Candidate.jpg    placeholder_file=masks.json

Compare two PDF Docments and ignore parts by using masks
    Compare Images    Reference.jpg    Candidate.jpg    placeholder_file=masks.json

Different Mask Types to Ignore Parts When Comparing

Areas, Coordinates
[
    {
    "page": "1",
    "name": "Top Border",
    "type": "area",
    "location": "top",
    "percent":  5
    },
    {
    "page": "1",
    "name": "Left Border",
    "type": "area",
    "location": "left",
    "percent":  5
    },
    {
    "page": 1,
    "name": "Top Rectangle",
    "type": "coordinates",
    "x": 0,
    "y": 0,
    "height": 10,
    "width": 210,
    "unit": "mm"
    }
]

More info will be added soon

Metadata

Release files for robotframework-imagecompare 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for robotframework-imagecompare 0.2.0
File Size Uploaded
robotframework_imagecompare-0.2.0.tar.gz 11.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for robotframework-imagecompare 0.2.0
File Interpreter ABI Platform
robotframework_imagecompare-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.8 kB

Release files / robotframework_imagecompare-0.2.0.tar.gz

Download URL robotframework_imagecompare-0.2.0.tar.gz
Size 11.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a1b0a4e6719683172456bacdd496501dce420459e55b96e3813b74d13f9e50e7
BLAKE2b-256 checksum
How to use checksums
df580dd8a779f80774435fc5ca6287e77f4f6b6634b964770c6240c03574a959
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.10.2 Windows/10

Release files / robotframework_imagecompare-0.2.0-py3-none-any.whl

Download URL robotframework_imagecompare-0.2.0-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
42b916f7905fb95ec09d00514d02343629d1099defe5edf8d7f2febb7480e21b
BLAKE2b-256 checksum
How to use checksums
d00ee8889af20b4384a0afe5c1e99f96903d6c9e26f1ac3c1e68f5b8040fead1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.2 CPython/3.10.2 Windows/10

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page