How to capture events in an window that is loaded within a page

Viewed 71

Let's say I have a website called https:// www.mysite.com. I am trying to figure out how I can capture events (like button click) on some other site (say - https://www.othersite.com that is willingly loaded) inside of mysite (something like a iframe).

Note: I do not have access to https://www.othersite.com

Something like :

<my-site>

// load external site https://www.othersite.com here

</my-site>

I tried using iframes but I realised it's not possible due to Same Origin Policy. (Please do not suggest the php solution with file_get_contents. I have gone through all the articles here on stackoverflow in the last couple of days but could not find a JS solution to this).

Basically, I was looking at something similar to Selenium IDE (It's extension here) where I want to capture events carried out by the user on https://www.othersite.com but its loaded on/inside mysite.

Any pointers to what can be some of the right approaches/strategies for solving this? This is very fundamental question in what I am trying to achieve and I want to do it the right way. Any guidance is greatly appreciated!

0 Answers
Related