Open ovenger-snow opened 7 months ago
Hi @ovenger-snow can you provide an example page/URL, then I could try to add a fallback for the visual elements to get it from the shadow DOM?
First example found - https://www.htmlelements.com/demos/menu/shadow-dom/index.htm
P.S. After some research, found out that Element Timing API doesn't support shadow DOM. So seems like option 1 is not viable.
What do you want to measure on that page? :) If you can share your real URL and exact what you want to measure it will be easier.
For element timings: The Chrome API does not support I think as long as it's attached to the DOM and you can get the position, you can get it for the visual elements? It works like this: it finds the element, gets the position and then uses that position in the video recording and calculates when it was painted.
Marks and stop watch can measure things but will not now when things is painted on the screen.
I can't share the current app I am working on. I was able to find another example - https://www.alodokter.com/aloshop So for example on this page, we can measure when categories are available, when some product is available and in the end the whole page loading time.
I didn't dive deep into how element timing works. Happy to hear your thoughts on how you would do it. Currently, just evaluating different options. With stop watch was thinking about using some selenium commands inside the stopwatch.
Your question
I am looking for some suggestions on how properly this can be done.
Goal: Execute tests against the application with shadow DOM and measure multiple elements/components timing + visual complete. So we would be able to get all the timings both when multiple elements are available and full page visual complete.
As of now, I can see several solutions to each but I assume there are even more.
--scriptInput.visualElements
. The limitation of it is that it doesn't work for shadow DOM as you can get it by singledocument.body.querySelector
. I understand that you may annotate elements but that will require additional work from dev teams.Including a sample of how I am doing it with stopWatch