Click on coordinates

I am trying to figure out how to click some coordinates of a web page after it loads (say x: 250px & y: 500px).

By my own click, I mean a real life event, for example, I use my mouse to click an image or link or what I want.

Is there any way to do this?

Thanks so much for your time.

+4
source share
1 answer

You need to check what support requirements for your browser, but this should work for most modern browsers:

document.elementFromPoint(x, y).click();
+6
source

Source: https://habr.com/ru/post/1613248/


All Articles