(!) Warning - this automation is broken since Payback introduced reCaptcha see #28 (!)
This script automatically logs in to your Payback account and activates available coupons. The script uses WebdriverIO to automate the process.
The containerized version runs Chromium headless:
Step 1: Create file docker-compose.override.yml
with:
version: '3'
services:
payback_activate:
environment:
- PAYBACK_USERNAME=your_username
- PAYBACK_PASSWORD=your_password
Step 2: Build image via:
docker compose build
Step 3: Run container payback_activate
via:
docker compose run payback_activate
- Node.js (v14 or later) and npm installed on your system.
- WebdriverIO and its required dependencies installed in your project folder.
- Clone or download the repository containing the script and the
package.json
file. - Open a terminal (Command Prompt on Windows) and navigate to the project folder.
- Run
npm install
to install the required dependencies. - Set the
PAYBACK_USERNAME
andPAYBACK_PASSWORD
environment variables with your Payback account credentials:
set PAYBACK_USERNAME=your_username
set PAYBACK_PASSWORD=your_password
$env:PAYBACK_USERNAME="your_username"
$env:PAYBACK_PASSWORD="your_password"
export PAYBACK_USERNAME=your_username
export PAYBACK_PASSWORD=your_password
With the environment variables set, you can now run the script:
npm run wdio
This command will start the script, which will perform the following steps:
- Open the Payback login page.
- Accept cookies.
- Log in using the provided credentials.
- Navigate to the coupons page.
- Activate available coupons.
After the script has completed, you will see the test results in your terminal.
Make sure to set the environment variables for your Payback account credentials every time you open a new terminal or restart your computer.