whatsapp spammer online web console code example

Example: whatsapp spammer script

# Import Selenium module
from selenium import webdriver
# Paste the address of the chromedriver.exe file in webdriver.Chrome()
driver = webdriver.Chrome('C:\\webdrivers\\chromedriver.exe')

driver.implicitly_wait(15) 
# Enter the website in .get()
driver.get('https://web.whatsapp.com')
# Enter the name to spam in the prompt
driver.find_element_by_css_selector("span[title='" + input("Enter name to spam: ") + "']").click()
# Enter the message to send
inputString = input("Enter message to send: ")
while(True):
    driver.find_element_by_xpath('//*[@id="main"]/footer/div[1]/div[2]/div/div[2]').send_keys(inputString)
    driver.find_element_by_xpath('//*[@id="main"]/footer/div[1]/div[3]/button').click()