|
|
|
|
|
by philliphaydon
1839 days ago
|
|
Oh, I didn't know this existed. Definitely going to try this. I'm currently using Puppeteer Sharp (https://github.com/hardkoded/puppeteer-sharp) and something like: > await page.GotoAsync("https://playwright.dev/dotnet"); > await page.ScreenshotAsync(new PageScreenshotOptions() { Path = "screenshot.png" }); Is broken, if you have background images in CSS the screenshot happens after Page Load is completed but before all CSS images are loaded so you end up not getting backgrounds in the screenshot. The only solution is to try add a delay before taking the screen grab, and it there's any sort of latency then the delay could result in not getting a good screenshot... |
|
It's an amazing piece of software for a domain that was kept on the side of the road for years.
If you already tried Cypress, then it's Cypress but with true multiple browser support, available in 4 languages, without the bloat and a cleaner and more idiomatic API.