Skip to main content

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

  1. Clone this repository
  2. Create .venv python -m venv .venv
  3. Activate .venv
    • VS Code: Ctrl+Shift+P, select option Python: Select Interpreter
    • PyCharm: Ctrl+Alt+S, select Project | Python Interpreter.
  4. Install all required packages pip install -r requirements.txt
  5. Download chromedriver
  6. 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 variabl default_tesseract_path with path where tesseract is installed.
  7. Run tests python -m robot tests/unit_test.robot or just robot 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

WatchUI-1.0.12.tar.gz (12.4 kB view hashes)

Uploaded Source

Built Distribution

WatchUI-1.0.12-py3-none-any.whl (11.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page