Created
October 25, 2017 00:54
-
-
Save aaayushsingh/c7d2d962c5b162468af434952d467803 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function whatsAppText(t) { | |
window.InputEvent = window.Event || window.InputEvent; | |
var d = new Date(); | |
var event = new InputEvent('input', {bubbles: true}); | |
var textbox = document.querySelector('#main > footer > div.block-compose > div.input-container > div.pluggable-input.pluggable-input-compose > div.pluggable-input-body.copyable-text.selectable-text'); | |
textbox.textContent = t; | |
textbox.dispatchEvent(event); | |
document.querySelector("button.compose-btn-send").click();} | |
for(i=1;i<3;i++){ | |
whatsAppText("Hola");} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment