Skip to content

claudiobizzotto/pyautogui-with-selenium

Repository files navigation

PyAutoGUI with Selenium

A little demo showing how to make PyAutoGUI and Selenium WebDriver work together.

Usage

Docker

Note: tested on a Linux machine only.

Requirements

  • Docker Engine
  • Docker Compose

Installation

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

Test

docker exec selenium-chrome ilovemepaws

Check the artifacts folder for screenshots.

Bring containers down:

docker-compose down

Pure Python

Requirements

OS packages (Linux):

  • python3-xlib
  • python3-tk
  • python3-dev
  • pip3
  • xvfb
  • xserver-xephyr

Pip packages:

  • virtualenv

Installation

virtualenv .venv
source .venv/bin/activate
pip install -r requirements.txt

Test

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.

Links

About

PyAutoGUI and Selenium WebDriver working together.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published