I would like to load an ifram and then click on a button inside this iframe (the button is the on with a little umbrella on the left just above the forecats for the next 14 days)
So far this is what I was able to do, but it's not working:
<style>
#my-div {
width: 80%;
height: 1500px;
overflow: hidden;
position: relative;
}
#my-iframe {
position: absolute;
top: -480px;
left: -100px;
width: 1280px;
height: 1400px;
}
</style>
<div id="my-div">
<iframe src="http://www.meteofrance.com/previsions-meteo-france/paris-01e-arrondissement/75001" id="my-iframe"
scrolling="no"></iframe>
</div>
<script>
var iframe = document.getElementById("my-iframe");
iframe.addEventListener("load", function () {
console.log(iframe)
var elmnt = iframe.contentWindow.document.getElementById("mf-accordion-bandeau-btn-unfold");
console.log(elmnt)
elmnt.click();
});
</script>