I am interested in creating an automated script that enter a status which are shown in textbox before submitting. I wish I can enter the textbox using keyboard event because I think there are some bot detection which implement the keyboard event check so simply textarea.value = "something"
would not work.
Here are my code :
<html>
<head>
<script src="https://code.jquery.com/jquery-3.1.1.min.js" integrity="sha256-hVVnYaiADRTO2PzUGmuLJr8BLUSjGIZsDYGmIJLv2b8=" crossorigin="anonymous"></script>
</head>
<body>
<textarea id="reply_message"></textarea>
<script>
window.onload = function() {
$('#reply_message').focus();
var e = $.Event('keydown', {
keyCode: 65
});
$('#reply_message').trigger(e);
}
</script>
</body>
</html>
I hope to enter letter 'a' on it, but it simply wont work, can anyone tell me how to do this? Thanks