I want to click automatically button1, which is in iframe which is on my website. scheme
iframe source:
...<button class="button1">...
I can click it automatically using
document.querySelector('.button1').click();
but only on frame source page.
My website has <iframe id="frame1" src="iframe source">
How to click it automatically from my page?