This is a simple Web WhatsApp Bot developed in python using Selenium. Helpfull to send messages to whatsapp contacts automatically using web.whatsapp.com and web automation.
This is a simple Web WhatsApp Bot developed in python using Selenium. Selenium is used mainly for automating web applications for testing purposes, but is certainly not limited to just that. Boring web-based administration tasks can (and should!) be automated as well.
Selenium has the support of some of the largest browser vendors who have taken (or are taking) steps to make Selenium a native part of their browser. It is also the core technology in countless other browser automation tools, APIs and frameworks.
Step 1: Install Selenium
sh $ pip3 install selenium
Step 2: Selenium requires a driver to interface with the chosen browser.
Step 3: Extract the downloaded driver onto a folder
Step 4: Set path variable to the environment. Paste this command to the terminal
sh $ export PATH=$PATH:/home/path/to/the/driver/folder/ Eg: $ export PATH=$PATH:/home/harshit/Desktop/WhatsAppBotStep 5: run whatsapp.py using Python3
sh $ python3 whatsapp.pyStep 6: When the browser is opened web.whatsapp.com will be opened and will ask to scan a QR code when you it first time
Step 7: After Scanning the QR code, you will be asked to press Enter Key in the terminal.
You can also add Names of the contact you want to send message in the Contacts.txt file. The contact name should match exactly with the name saved in your contacts.