RobotFramework library package for automated visual testing.
Project description
WatchUI
Documentation | Tesena | Pypi
Basic Info
Robot Framework visual testing library for visual difference testing as well as image content testing (including PDF documents).
Runs on Selenium or Playwright to generate screenshots, PyMuPDF (supported version 1.19+
) to process PDFs and Tesseract OCR to recognize text.
Project structure
WatchUI
└── .github/workflows # All github actions definitions for CI
└── Img # Test and demo data
└── WatchUI # WatchUI library implementation
│ └── WatchUI.py # Implementation file
└── tests # Tests and examples in Robot Framework
│ └── keywords # More tests for keywords and definitions of variables
│ └── unit_test.robot # Basic unit tests
└── README.MD # Here you are :-)
└── setup.py # File for easy setup use with pip install .
Install
For quick start use:
pip install WatchUI
For more details see our Documentation.
Sample results
Comparison of two screens where the differences are showed by red rectangles. In this example we ignored the dynamic boxes during comparison. These boxes were overlaid by black rectangles (the right on the pictures) .
The red rectangles outlining missing elements on compared screens. In this case pictures are completely different due to bot protection feature during retesting.
Development
- Clone this repository
- Create
.venv
python -m venv .venv
- Activate
.venv
- Install all required packages
pip install -r requirements.txt
- Download chromedriver
- Install [tesseract] (https://tesena-smart-testing.github.io/WatchUI/start.html#install-tesseract)
Note: In order to get test case within
unit_test.robot
working you have install also Czech language otherwise last test will be failing. Note2: Windows developer need to set up PATH in order to get all test passing OR set importing variabldefault_tesseract_path
with path where tesseract is installed. - Run tests
python -m robot tests/unit_test.robot
or justrobot tests/unit_test.robot
Note: If tesseract is not installed you can still use many features of WatchUI. Currently WatchUI need tesseract only if you need to use keywords: Image to string
, Image area on text
and Return text from area
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.