Skip to main content

An input event recorder and player for automatic testing

Project description

Snitch, an input event recorder and player

Snitch is a Python3 program using the Qt5 framework for GUI and the pyautogui and pynput modules for automation.

Prerequisites

A working installation of Python3 with pip package installer.

In order to record and control the mouse on Linux systems, the packages python3-tk and python3-dev are required.

Installation

For now Snitch is available on the PyPI test repository. Install by running the command:

pip install snitch-ci

You can then run the program with:

snitch

Building from sources

First you need to install the dependencies with:

pip install -r requirements.txt

Then generate the code for Qt interface and assets using:

bash build.sh

You can now run the program as a python package:

python -m snitch

Note about scrot

The pyautogui on Linux depends on the scrot utility for screen captures. This utility only works with X11. The most recent versions of gnome-shell are based on Wayland instead of X11. For those versions, the scrot utility produces only black pictures.

One workaround is installing the Gnome native capture utility gnome-screenshot and creating a wrapper script acting as scrot. The most basic working way is putting the following script in the /usr/bin/scrot file (and granting it execution permissions):

#! /bin/bash
gnome-screenshot -f $@

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

snitch-ci-0.3.2.tar.gz (114.5 kB view hashes)

Uploaded Source

Built Distribution

snitch_ci-0.3.2-py3-none-any.whl (127.1 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