Change input value with javascript and RPA

I never even heard of RPA/Selenium until today. Maybe I am getting old.
Anyway, I have been struggling with website that I am trying to change the value of an input on using
javascript. Very simple function but it won’t work. document.getElementById(‘abc’).value=‘123’;
The value changes, but the event listeners don’t pick it up. I tried every JS trick in the book, but can’t get it to work.
However, using RPA macros, I can get it to work.
So my question is how can I use javascript to execute this. I don’t really need a macro. I just want JS to be able to maybe use the RPA API or some sort of command to get RPA to change the value of the input.