Skip to main content
Transform your testing process with: Company-wide Licences, Test Observability & App Percy

iframe content not captured (CORS)

Resolve the issue of capturing iframe content with Cross-Origin Resource Sharing (CORS) restrictions.

Frame elements are serialized when they are CORS accessible and if they haven’t been built by JavaScript when JavaScript is enabled. They are serialized by recursively serializing the iframe’s own document element with the @percy/dom library. Once the frame has been serialized, it’s set as a srcdoc on the iframe element.

If an iframe is not being correctly captured it could be either due to timing or the iframe not being accessible because of CORS restrictions. If you control the frame origin, you can add headers to allow cross-origin access from the root origin.

Reference Topic

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback!

Talk to an Expert
Download Copy