A Robot Framework automation script for ordering pizza from pizzabuona.ch. The script automates everything up to the final confirmation, allowing for manual review before placing the order.
Note: This project currently has the author's favorite order hard-coded (Pizza Contadina with extra toppings and Calzone Bomba). While you can use this as a template for your own pizza ordering automation, you'll need to modify the selectors and order details in
src/keywords/pizza_keywords.resource
to match your preferred pizzas.
- Automatically fills in delivery location
- Orders a Pizza Contadina with two extra toppings
- Orders a Calzone Bomba
- Fills in all delivery details
- Selects on-site credit card payment method
- Stops at final confirmation for manual review
.
├── src/
│ └── keywords/
│ └── pizza_keywords.resource # Robot Framework keywords for pizza ordering
├── tests/
│ └── pizza_order.robot # Main test suite
├── resources/
│ ├── .env # Your personal delivery details (not committed)
│ └── .env.template # Template for delivery details
├── .python-version # Python version for the project
├── pyproject.toml # Project metadata and dependencies
├── uv.lock # Locked dependencies for reproducible installs
├── run.sh # Script to run the automation
└── README.md # This file
- Python 3.x
- Robot Framework
- Browser Library for Robot Framework
We recommend using uv for faster and more reliable package management, but you can also use vanilla Python.
- Install uv (see installation docs):
curl -LsSf https://astral.sh/uv/install.sh | sh
- Initialize the project and install dependencies:
uv sync # This will create venv and install dependencies from pyproject.toml
source .venv/bin/activate
- Create a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
- Install dependencies:
pip install robotframework robotframework-browser
Initialize the Browser library:
rfbrowser init
- Copy the environment template to create your .env file:
cp resources/.env.template resources/.env
- Edit
resources/.env
with your delivery details:
POSTCODE="1234"
CUSTOMER_FIRST_NAME="John"
CUSTOMER_LAST_NAME="Doe"
STREET_AND_NUMBER="Example Street 123"
PHONE="+41123456789"
EMAIL="[email protected]"
DELIVERY_INFO="1st Floor" (optional)
Run the automation:
./run.sh
The script will:
- Open Chrome
- Navigate through the ordering process
- Fill in all details
- Stop at the final confirmation
- Keep the browser open for manual review (for 60 seconds or until Ctrl+C)
To add new dependencies:
uv add <package-name> # This will update pyproject.toml and uv.lock
To upgrade dependencies:
uv lock --upgrade-package <package-name>
- The final order confirmation button is intentionally commented out to prevent accidental orders
- Manual review is required before completing the order
- Browser stays open for verification before actual order placement
- Personal information is stored in
resources/.env
file (not committed to git)