my current work is basically clicking a button every couple of minutes and check if there are any new tickets.
With some programming background I thought this would be an easy-to-automate task, but being completely new to javascript, I'm already struggling with the "button clicking".
Unfortunately, because it is an internal website, I can't share the exact code, but I'll try to give as much information as I am able to.
I tried to "click" in the console:
'document.getElementById("IDofButton").click()'
But it gives me an error "undefined"; without the ".click()" at the end I get the correct element as a result. I tried it with "$" instead of document.getElementById, but even that didn't work, so I gave up on the idea of simply clicking the button, even though I think that's the easier way.
Debugging in chrome with breakpoints and the performance profiler, I could find the first called function "h()", it runs for 0.020 ms, then another function gets called, running for 0.012 ms and then a longer function gets called running for 14.8 ms, several others follow. My guess or better hope, was that the first two functions check something and then start the whole process. But I can't simply call any of the functions with like the following example syntax: "h()".
I'd be very glad, if anyone has an idea or could point me in the right direction. Thank you very much.
EDIT/UPDATE:
I finally found the problem: While debugging with the performance profiler I saw, that the functions are triggered by a mouseup event and I thought the "[...].click()" simulates a mousedown and a mouseup instead of a click. I now copied a function simulating the whole mouseover>mousedown>mouseup>click and it works as expected.
Thank you to all who helped me with the whole situation!