You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Headless chrome – testing WebGL using playwright
2
+
3
+
We have webgl animations that requires GPU hardware acceleration to achieve good performance. Smooth WebGL animation should run at 60 frames per second. Our e2e tests will visit website with webgl animation, take screenshot and save it as .png file. We will try with different playwright settings and check the results.
4
+
5
+
Testing canvas elements and WebGL animations is difficult task. To achieve smooth animations and good performance in end-to-end testing - framework Playwright is good choice. With proper configuration we can run parallel tests using hardware acceleration. Achieving 60 frames per seconds in WebGL animation is possible even in Headless Chrome.
6
+
7
+
#### Demo scenario
8
+
Demo scenario is simple: visit three urls and take screenshots. First url: chrome://gpu/ to check if chrome having “Hardware accelerated” option enabled. Second url: https://www.soft8soft.com/webglreport to debug webgl browser settings and finally third url: https://webglsamples.org/aquarium/aquarium.html with animation.
9
+
10
+
Expected results: GPU hardware acceleration enabled and smooth animation with 60 frames per second.
Saved screenshots will be placed in /screens/ directory. Here are 3 screenshots saved after running headless Chrome with GPU support enabled (Hardware acceleration):
0 commit comments