Whatsapp Message – Python Script

Video is ready, Click Here to View ×

Learn how to automate the messaging feature of WhatsApp using selenium.

Code is here :

Updated code :

For more follow here :


  1. Hi, I'm not very good with English, sorry.

    maybe you could use an android emulator to avoid having to scan the qr code every time you start the script ?.

    This text was translated from Spanish.


  2. thank you so much!
    btw for the new classes names that were changed this worked for me

    msg_box = driver.find_element_by_class_name('_2S1VP ')

    for i in range(count):



  3. Hi , I tried this code, but I get the error "selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element:" when the line : find_element_by_xpath is executed- even though the name I am inputting exists . Can you please give some guidance on how to resolve this

  4. Hi,
    Day 1: It worked for me.
    But, on day 2 I am getting below error…

    raise exception_class(message, screen, stacktrace)
    selenium.common.exceptions.NoSuchElementException: Message: no such element: Unable to locate element: {"method":"xpath","selector":"//span[@title=

    PLease guide me..

  5. Thx very helpful , you could find elements a bit faster by pressing the courser icon on the left on the google chrome development window and then press the element and it will show where its on the HTML code.

Leave a Reply

Your email address will not be published.