My html code looks like:
#shadow-root (closed) == $0
<iframe src="https://challenges.cloudflare.com/cdn-cgi/challenge-platform/h/g/turnstile/if/ov2/av0/rcv0/0/q9nst/0x4AAAAAAAVlQeNrI_m-kb9K/auto/fbE/normal/auto/" allow="cross-origin-isolated; fullscreen; autoplay" sandbox="allow-same-origin allow-scripts allow-popups" id="cf-chl-widget-q9nst" tabindex="0" title="Widget containing a Cloudflare security challenge" style="border: none; overflow: hidden; width: 300px; height: 65px;"></iframe>
I am trying to assert (expect) that this Cloudflare window is visible using Playwright and js.
But, I am not even able to access the element using Chrome console with:
document.querySelector("iframe[title='Widget containing a Cloudflare security challenge']");
Why my iframe code is not visible neither in the automation script nor in the Chrome console?
note:
-
When starting the script I am using:
launchOptions: {
args: [‘–disable-web-security’],
}