SHARE
TWEET

Untitled

a guest Jun 15th, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from selenium import webdriver
  2.  
  3. driver = webdriver.Chrome()
  4. driver.get('http://web.whatsapp.com')
  5.  
  6. name = input('Enter the name: ')
  7. msg = input('message: ')
  8. count = int(input('Enter the count: '))
  9.  
  10. input('Enter anything after scanning QR code')
  11.  
  12. user = driver.find_element_by_xpath('//span[@title = "{}"]'.format(name))
  13. user.click()
  14.  
  15. msg_box = driver.find_element_by_class_name('_2i7Ej')
  16.  
  17. for i in range(count):
  18.     msg_box.send_keys(msg)
  19.     button = driver.find_element_by_class_name('hnQHL')
  20.     buton.click()
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top