It has been found that the pywhat kit library has a bug, in which it opens WhatsApp in the browser but does not send messages.

I mailed the developer and has responded that the bug will be fixed in the upcoming version.

Apart from that, I have found the solution to the bug, if anybody needs it, I am more than happy to share it with you guys.