I searched for some things about clicking on coordinates using javascript and I found that this line of code helps you click on x, y coordinates
document.elementFromPoint(x, y).click();
Therefore, when I set the width and height of the html element or button, it clicks it well and redirects me to the page I need.
But when I have an iframe html object (like a google ad) it doesn't work. I canβt understand why, although due to the fact that I think that βclick ()β is like simulating a normal mouse click ... or am I mistaken about that?
I read that the iframe has protection that you cannot go into html elements, but all I'm trying to figure out is how to simulate a normal click on an iframe.
Thanks so much for your time.
user4544229
source share