I have a HTML website that inside the iframe I have a <script>
tag.
I can get the iframe by running:
iframe = document.getElementsByTagName("iframe")
When I print iframe[0]
I received:
<iframe id="576259869" src="https://..." frameborder="0" allow="autoplay; fullscreen" allowfullscreen="" class="sc-kVrTmx jfegoL" data-ready="true"></iframe>
#document
<html lang="en">
<head>...</head>
<body>
<div id="..">...</div>
<script>...</script>
</body>
</html>
</iframe>
I tried to catch it like that:
iframe[0].getElementsByTagName("script")
But it gives me an empty arrary HTMLCollection []
although I can see the tag inside the iframe.