As you can see in the attached code, I am taking two screenshots. Both screenshots are targeting same HTML element, which is contained into a SHADOW root.
First screenshot is taken successfully (except for the black circle being displayed) as you can see in attached build. However, the second screenshot does not display anything. It is quite bizarre, since screenshot is taken to the same element.
This seems like some issue while rendering and not related to SDK(I've verified it on my side and SDK is able to snapshot
it correctly), please raise a support ticket to us https://www.browserstack.com/support/percy
The problem
I am facing issues when taking screenshots on a site which contains a Shadow DOM element.
Environment
@percy/cli
version: 1.21.0Details
As you can see in the attached code, I am taking two screenshots. Both screenshots are targeting same HTML element, which is contained into a SHADOW root.
First screenshot is taken successfully (except for the black circle being displayed) as you can see in attached build. However, the second screenshot does not display anything. It is quite bizarre, since screenshot is taken to the same element.
I have been researching, and seems taking screenshots of Shadow DOM element is achievable. https://docs.percy.io/docs/shadow-dom
Additionally, I have replicated same code into Cypress, and got exactly same result
Debug logs
Code to reproduce issue