Chrome is required for this script. For Linux users Chromium browser will also work
To install Chromium Browser (only for Linux usesrs) :
$ sudo apt-get install chromium-browser
Download Chrome driver from here: Chromedriver download page( choose your specific version )
Extract it in a known location , as we need the location later (as mentioned in the code's comments)
Steps To Follow
Step 1: Enter the name of the contact
Step 2: Enter the number of messages you want to send
Step 3: Type your message
Step 4: Scan the QR code to login into whatsapp web
Step 5: Wait for your messages to be sent :)
Note : Try to keep that contact on top ( you can pin that contact ) to avoid any errors
You're ready to go
Please do not try this with people who might end up blocking you