Ankit404butfound / PyWhatKit

Send WhatsApp message at certain time and many other things.
MIT License
1.37k stars 297 forks source link

send message and send image is not working #214

Closed samadpls closed 8 months ago

samadpls commented 2 years ago

Description

function sendwhatmsg() and sendwhats_image() isn't working sendwhat message is copying the text on the message bar only but not sending, similarly sendwhats_image is not uploading or sending the image. Because there is no implemented functionality for uploading the image or sending it same goes with text message.

This could be done by using the keyboard library and clicking the remaining flow to perform the tasks

To Reproduce

  1. send_image( path=img_path, caption=caption, receiver=receiver, wait_time=wait_time )

by using the above method image will select but not sent to the receiver number

  1. send_message(message=message, receiver=phone_no, wait_time=wait_time)

by using the above method message will type but not send to the receiver number

Screenshots

It doesn't work for uploading or sending image and doesn't work with sending a message(hence it does write a message in the input field of WhatsApp but don't click the send button)

Version Information

ns23k commented 2 years ago

try solutions in #149

Enemfu commented 1 year ago

Hi...I also spent quite some time trying to solve this same problem. In my case, two details helped me. I hope it helps you too. 1º I put the full path, exactly this way below: r "C:\u003d\u003d\u003d\u003d\inves.png" 2º includes the complete path of the image with the backslash, the letter 'r', and just below the line of WhatsApp code I put the timesleep(5), like this: pywhatkit.sendwhats_image("+3532498XXXX39" , r "C:\Users\Cliente\ipynb\inves.png") time.sleep(5)