For study purposes, i'm trying to programatically send a message in the web version of Whatsapp Web (https://web.whatsapp.com) using only pure Javascript.
By using Chrome devtools, i can see the box where the user type the message, which is show on the image below. Actually is not an input ou textarea, is a div. So i'm trying to fill it with my message by using the code below :
document.getElementsByClassName('_3u328 copyable-text selectable-text')[0].innerText = 'This is my message';
Altough i can see the box filled with the message, when i try to send this message, nothing happens. It's like the box was not filled. I think i need to use something related to dispatchEvent method, but i don't know how.
Please help me, thanks