I am developing a chrome extension that runs some javascript on a particular web page.
I want to simulate a click action on the google docs presentation view page’s ‘prev’, ‘next’ toolbar.
Unfortunately, both are tags with onmousedown events corresponding to obfuscated javascript.
If they were anchors,
document.getElementById(“ToolbarNext”).onclick(); works. However, the same for onmousedown does not seem to work, probably because it requires mouse co-ordinates, etc.
How do I generate this event?
An other option is to simulate a keypress ‘j’ or ‘k’ on the DOM. I tried a few options but could not figure that out either.
try
dispatchEvent/fireEventmethods