Skip to content

Instantly share code, notes, and snippets.

@go4Mor4
Created June 17, 2021 21:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save go4Mor4/501a65165d35d5bb8c0afa587be74028 to your computer and use it in GitHub Desktop.
Save go4Mor4/501a65165d35d5bb8c0afa587be74028 to your computer and use it in GitHub Desktop.
from webdriver_manager.chrome import ChromeDriverManager
from selenium import webdriver
driver = webdriver.Chrome(ChromeDriverManager().install())
driver.implicitly_wait(15)
driver.get('https://web.whatsapp.com')
driver.find_element_by_css_selector("span[title='" + input("Enter name to spam: ") + "']").click()
inputString = input("Enter message to send: ")
qnt_messages = int(input("Enter number of messages: "))
for i in range(qnt_messages):
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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment