I want to simulate clicks on https://www.thesnidewalk.com/ For example simulate clicks on "walk" button at start menu.
I tried this, got coordinates on button and made mouse event and dispatched it:
const newEv = new MouseEvent("click", {
clientX: 1274,
clientY: 970
});
const canvas = document.getElementById("canvas");
canvas.dispatchEvent(newEv);
At console I got "true" but it not affected on this canvas game. I have tried to put at mousEevent coordinates from screen offset and coordinates exactly of canvas, but nothing help.