Ankit404butfound / PyWhatKit

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

sendwhats_image does not attach image and send it #315

Open snehashukla29 opened 3 months ago

snehashukla29 commented 3 months ago

Description

The pywhatkit sendwhats_image function redirects to send_image function in the core module. As of reporting this bug, the function does not attach the image or send it along with the caption - even though the caption is typed in the whatsapp textbox on screen.

To Reproduce

call sendwhats_image function with the required parameters

Version Information

snehashukla29 commented 3 months ago

The send_image function in the core module already uses the click() function from pygui to find the text box in which the text is getting typed. I have reused the same to find the textbox again before pasting the image. The current implementation was using the findtextbox() method which was internally using pygui to locate an image on screen which it could not find.

Please let me know if this approach seems right. This has been tested on MacOs with Firefox to be working for me.