It's good to do something just for fun sometimes. This time I'll show you my creative & problem solving process for figuring out how to move a cursor and click on any element on a page including links, buttons or even inputs.
What's important here is that the need for breaking some rules but still to rely on understanding of how JavaScript works under the hood (like for example scope or variables).
Tools:
JavaScript
AppleScript
Keyboard Maestro
Arc Browser