This is a Selenium-based bot that automates the process of checking for earlier road test appointments on the ICBC website. If an earlier appointment is found, the bot sends an email notification.
- Logs into the ICBC appointment system using credentials from a
.envfile - Checks for an earlier available road test appointment
- Sends an email notification if an earlier appointment is found
- Runs periodically (e.g., every 10 minutes)
- Python 3.11.4
- Google Chrome browser
- ChromeDriver (matching the installed Chrome version)
- A Gmail account for email notifications
-
Clone the repository:
git clone https://github.com/codingpog/Road-Test-Booking-Bot.git cd Road-Test-Booking-Bot -
Create a virtual environment for Windows (optional but recommended):
python -m venv .venv # Create the virtual environment Set-ExecutionPolicy Unrestricted -Scope Process # Temporarily allow PowerShell scripts to run in the current session .venv\Scripts\activate.PS1 # Activate virtual environment in PowerShell
-
Install dependencies:
pip install selenium
pip install python-dotenv
pip install python-dateutil
pip install yagmail
pip install schedule
-
Set up your
.envfile with the following format:LAST_NAME=YourLastName LICENSE_NUMBER=YourLicenseNumber KEYWORD=YourKeyword EMAIL[email protected] PASSWORD=your-app-password (set up app password in Gmail first)
⚠️ Important: Do not share your.envfile or push it to GitHub. -
Download and place
chromedriver.exein the project folder. Ensure it matches your Chrome version.
Run the script to check for earlier appointments:
python main.py