I am trying to simulate clicks in chrome extension developing. The normal method I could find online is document.elementFromPoint().click()
, but that does not work for my case. I am trying to simulate clicks in the range of a cross-domain iframe. So when I use document.elementFromPoint()
I will get a result of iframe and I can't do anything with a cross-domain iframe. So I wonder if there is a way to simulate the click by the exact coordinates on the screen in web developing? I know it's possible to do so in a system-level script like some python packages. But can JavaScript do this?
So the short question would be: Is it possible to simulate a mouse click in JS without getting the corresponding element?