pywhatkit.sendwhatmsg_to_group function is not working

Viewed 3239

It might sound crazy but yesterday the function pywhatkit.sendwhatmsg_to_group worked fine with me but today I do not seem to make it work. The message was sent using the group id.

pywhatkit.sendwhatmsg_to_group('Groupid','Testing message',11,51)

But it just worked once. Now the window opens and the particular group also gets selected but the message doesn't get typed not sent. Has this function worked for anyone?

I am using it on windows machine and python3.

1 Answers

I am using:

  1. OS: macOs Big Sur 11.4
  2. Browser:O Google Chrome 91.0.4472.114
  3. IDE: PyCharm CE 2021.1.3
  4. Pywhatkit: 5.0

I changed a line of code of the sendwhatmsg_to_group function to work in my environment.

I replaced the code (line 166):

pg.click(width / 2, height - height / 10)

with this:

pg.click(width / 2, height / 2)

And then it worked.

PS: The previous code was opening an application from my program bar.

Related