Comparing visual artifacts can be a powerful, if fickle, approach to automated
testing. Playwright makes this seem simple, but the details might take a little
finessing.
Custom elements are simple, but powerful. Yet they are easily misunderstood
these days, often because they’re mistaken for something they were never meant
to be. Let’s just look at what it is they actually do – and don’t do.
It’s well-established that the web has issues: From
user-hostile UI patterns and twisted
search results to sluggish performance and battery-draining bloat. Much of that
is caused by
questionable technology choices, not
least in the realm of client-side JavaScript. In the interest of furthering our
collective understanding of this self-inflicted quagmire, let’s examine one
small-but-significant part where developers take the reins: Painting pixels on
the screen.