This script automates login and TOEIC exam training exercises on Global Exam.
- 🔐 Automated Login - Logs in with your credentials from
.env - 🍪 Cookie Handling - Automatically accepts cookie banners
- 🏫 Organization Selection - Selects the IPSSI organization if prompted
- 📝 Exam Training - Automatically solves "Entraînement 201" questions using a built-in Q&A mapping
- 🔄 Continuous Loop - Repeats the activity indefinitely
The script includes several stealth techniques to avoid bot detection:
- Human-like mouse movements using Bezier curves with occasional overshoot
- Randomized typing delays
- Realistic viewport and user agent configuration
- WebGL and navigator spoofing
- Persistent browser session
- Python 3.9+ installed
- Install dependencies from
requirements.txt:pip install -r requirements.txt playwright install
- Create a
.envfile with your credentials:EMAIL=your_email PASSWORD=your_password
Execute:
python script_resolve_exam.pyThe script will:
- Login - Navigate to Global Exam and log in with your credentials
- Accept Cookies - Handle any cookie consent banners
- Select IPSSI - Select the IPSSI organization if the selection page appears
- Navigate to Activity - Go to the exam training exercises library
- Start Activity - Click "Entraînement 201" and start the activity
- Solve Questions - Answer each question using the built-in Q&A mapping
- Complete Pages - Click "Valider" to move between pages, or "Terminer" to finish
- Loop - Return to home and repeat the activity continuously
The script uses a predefined mapping (EXAM_QA_MAP) to match question snippets to correct answers. Questions are matched by checking if a key phrase appears in the question text.
- The browser session is persisted in
./browser_session/to maintain login state - The script uses French locale (
fr-FR) and Paris timezone - Press
Ctrl+Cto stop the script manually