Fix percyCSS for invalid DOM
Understand and address warnings related to Percy DOM Serialization for screenshot capture during the visual testing process.
Percy works by serializing the DOM and sending it to our infrastructure for capturing screenshots. The warning DOM elements found outside </body>, percyCSS might not work
usually comes during the serialization of the DOM when there are elements positioned outside the </body> tag, leading to issues with the proper injection of percyCSS.
To address this issue, use the reshuffleInvalidTags: true
(default is false) configuration. This attempts to reposition these elements inside the </body> tag.
This config option can be used globally in .percy.yml with the percy snapshot
command, and at the per-snapshot
level with both the percy snapshot
command and the percySnapshot
function.
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
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!