I'm making an autofill to fill the values automatically.
I've this page using AngularJS. When I copy the mobile number using $("input[name='username']").val('9999999999')
it does not cause change event be fired upon which "Get OTP" link should be activated.
Sometime back I has asked similar question : How to trigger click on a button
I've tried many ways like Is it possible to simulate key press events programmatically? but I'm not able to make it work.
I've also tried sending focus-in event, then simulated mouse click within it, then copying the value then simulating mouse click on a different element etc.
What could be the way to make it work?