Skip to content

An enhanced WhatsApp message automation tool with both GUI and console interfaces using Selenium WebDriver. Built for educational purposes to explore browser automation capabilities. Just a fun project to play around.

License

Notifications You must be signed in to change notification settings

akash1331/Selenium-Automated-Message-Sender

Repository files navigation

WhatsApp-Spammer

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.

WhatsApp Spammer Logo

Disclaimer

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.

Features

  • 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

Requirements

  • Python 3.6+ (tested on Python 3.10.11)
  • Google Chrome browser
  • Active internet connection
  • WhatsApp account

Installation

Option 1: Using the Virtual Environment (Recommended)

The project comes with a built-in launcher that sets up a virtual environment automatically.

  1. Clone the repository or download the ZIP file:

    git clone https://github.com/akash1331/Selenium-Automated-Message-Sender.git
    cd Selenium-Automated-Message-Sender
  2. Run the launcher:

    python launch_spammer.py
  3. The launcher will create a virtual environment and install all required dependencies if they're not already installed.

Option 2: Manual Setup

  1. Clone the repository or download the ZIP file:

    git clone https://github.com/akash1331/Selenium-Automated-Message-Sender.git
    cd Selenium-Automated-Message-Sender
  2. 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
  3. Install required packages:

    pip install -r requirements.txt

Usage

Running the Application

Run the launcher script to choose your preferred interface:

python launch_spammer.py

Using the GUI Version

  1. Select option 1 from the launcher
  2. 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
  3. Click "Spam" button
  4. Scan the QR code when WhatsApp Web opens
  5. The application will find your contact and send the messages automatically

Using the Console Version

  1. Select option 2 from the launcher
  2. Enter the requested information:
    • Target name (must be in your contacts)
    • Message to send
    • Number of messages
    • Time interval between messages (in seconds)
  3. Scan the QR code when WhatsApp Web opens
  4. The application will find your contact and send the messages automatically

How It Works

This application uses several techniques to ensure reliable WhatsApp Web automation:

  1. Selenium WebDriver: Primary automation engine that controls the Chrome browser
  2. Undetected ChromeDriver: Used in the console version to avoid detection
  3. PyAutoGUI: Provides fallback mechanisms for focusing and clicking elements when Selenium methods fail
  4. Multiple Selection Strategies: Uses various XPath and CSS selectors to find elements, improving compatibility across WhatsApp Web updates
  5. Contact Search Optimization: Special handling for contacts with emojis or special characters

Troubleshooting

Common Issues

  1. 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
  2. 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
  3. WhatsApp Web Changes:

    • WhatsApp Web interface is frequently updated, which may affect element selectors
    • The application includes multiple fallback strategies to handle most changes

Advanced Configuration

Experienced users can modify the following files for customization:

  • simpler_spammer.py: GUI implementation
  • console_spammer.py: Console implementation
  • launch_spammer.py: Launcher and environment setup

Project Structure

  • console_spammer.py: Command-line interface implementation
  • simpler_spammer.py: GUI implementation
  • launch_spammer.py: Unified launcher script
  • whatsapp.ico: Application icon
  • requirements.txt: Required Python packages
  • CHROMEDRIVER_FIX.md: Troubleshooting guide for ChromeDriver issues

Contributing

Contributions are welcome! Please feel free to submit a Pull Request to the repository at https://github.com/akash1331/Selenium-Automated-Message-Sender.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Credits

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

An enhanced WhatsApp message automation tool with both GUI and console interfaces using Selenium WebDriver. Built for educational purposes to explore browser automation capabilities. Just a fun project to play around.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages