A little demo showing how to make PyAutoGUI and Selenium WebDriver work together.
Note: tested on a Linux machine only.
- Docker Engine
- Docker Compose
docker-compose build
On Linux, enable your host's OS user to create connections to the host’s X11 server:
xhost +local:$(whoami)
Bring the containers up:
docker-compose up -d
docker exec selenium-chrome ilovemepaws
Check the artifacts
folder for screenshots.
Bring containers down:
docker-compose down
OS packages (Linux):
python3-xlib
python3-tk
python3-dev
pip3
xvfb
xserver-xephyr
Pip packages:
virtualenv
virtualenv .venv
source .venv/bin/activate
pip install -r requirements.txt
Bring the test website up:
cd tests
python3 -m http.server
Inside ilovemepaws
, replace http://i-love-me-paws:8000
with http://localhost:8000
.
Execute script:
./ilovemepaws
Check the artifacts
folder for screenshots.