An enhanced WhatsApp message automation tool with both GUI and console interfaces. This application allows you to automatically send multiple messages to a WhatsApp contact.
This application is purely for educational purposes. Do not use it for harassment, spreading hate, spamming, or any malicious activities. Be respectful of others' privacy and communication preferences.
- Dual Interfaces: Choose between a user-friendly GUI or a console interface
- Contact Name Flexibility: Supports finding contacts with emoji or special characters in their names
- Auto-ChromeDriver Management: Automatically downloads and configures the correct ChromeDriver for your Chrome version
- Multiple Fallback Mechanisms: Ensures reliable operation across different WhatsApp Web versions
- Error Handling: Comprehensive error handling for a smooth user experience
- Python 3.6+ (tested on Python 3.10.11)
- Google Chrome browser
- Active internet connection
- WhatsApp account
The project comes with a built-in launcher that sets up a virtual environment automatically.
-
Clone the repository or download the ZIP file:
git clone https://github.com/akash1331/Selenium-Automated-Message-Sender.git cd Selenium-Automated-Message-Sender
-
Run the launcher:
python launch_spammer.py
-
The launcher will create a virtual environment and install all required dependencies if they're not already installed.
-
Clone the repository or download the ZIP file:
git clone https://github.com/akash1331/Selenium-Automated-Message-Sender.git cd Selenium-Automated-Message-Sender
-
Create a virtual environment and activate it:
# On Windows python -m venv whatsapp-env .\whatsapp-env\Scripts\activate # On macOS/Linux python3 -m venv whatsapp-env source whatsapp-env/bin/activate
-
Install required packages:
pip install -r requirements.txt
Run the launcher script to choose your preferred interface:
python launch_spammer.py
- Select option 1 from the launcher
- Fill in the following fields:
- Name of the target: The name of your WhatsApp contact (exactly as it appears in your contacts)
- Message: The text you want to send repeatedly
- Number of messages: How many times to send the message
- Time interval between messages: Delay in seconds between messages
- Click "Spam" button
- Scan the QR code when WhatsApp Web opens
- The application will find your contact and send the messages automatically
- Select option 2 from the launcher
- Enter the requested information:
- Target name (must be in your contacts)
- Message to send
- Number of messages
- Time interval between messages (in seconds)
- Scan the QR code when WhatsApp Web opens
- The application will find your contact and send the messages automatically
This application uses several techniques to ensure reliable WhatsApp Web automation:
- Selenium WebDriver: Primary automation engine that controls the Chrome browser
- Undetected ChromeDriver: Used in the console version to avoid detection
- PyAutoGUI: Provides fallback mechanisms for focusing and clicking elements when Selenium methods fail
- Multiple Selection Strategies: Uses various XPath and CSS selectors to find elements, improving compatibility across WhatsApp Web updates
- Contact Search Optimization: Special handling for contacts with emojis or special characters
-
Contact Not Found:
- Make sure the contact name is entered exactly as it appears in your WhatsApp
- For contacts with emojis, try entering just the text portion of the name
- Try sending a message manually to the contact first so they appear in your recent chats
- Increase the QR scan wait time to ensure all contacts load properly (30+ seconds)
- The application now includes multiple fallback methods to find contacts
- See CHROMEDRIVER_FIX.md for more detailed contact detection troubleshooting
-
ChromeDriver Issues:
- The application automatically downloads the appropriate ChromeDriver version
- If you encounter issues with the automatic download, see CHROMEDRIVER_FIX.md for troubleshooting
- Ensure you have a stable internet connection for the first run
-
WhatsApp Web Changes:
- WhatsApp Web interface is frequently updated, which may affect element selectors
- The application includes multiple fallback strategies to handle most changes
Experienced users can modify the following files for customization:
simpler_spammer.py
: GUI implementationconsole_spammer.py
: Console implementationlaunch_spammer.py
: Launcher and environment setup
console_spammer.py
: Command-line interface implementationsimpler_spammer.py
: GUI implementationlaunch_spammer.py
: Unified launcher scriptwhatsapp.ico
: Application iconrequirements.txt
: Required Python packagesCHROMEDRIVER_FIX.md
: Troubleshooting guide for ChromeDriver issues
Contributions are welcome! Please feel free to submit a Pull Request to the repository at https://github.com/akash1331/Selenium-Automated-Message-Sender.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
- Project by Akash (https://github.com/akash1331)
- Enhanced version with improved reliability and new features
This project is licensed under the MIT License - see the LICENSE file for details.