Hacker News new | ask | show | jobs
by tw4l 1059 days ago
We experimented moving to Playwright but Playwright doesn't handle long-running browser sessions well, as the devs have (maybe rightly) prioritized its use for testing over archival use cases and want you to spin up a browser each time. For archival purposes, that doesn't work as well because we're not able to save the browser profile to retain cookies such as login credentials, so we've moved back to using Puppeteer for now.
2 comments

You can use launchPersistentContext and define a custom user directory to maintain profile state: https://playwright.dev/docs/api/class-browsertype#browser-ty...
Answered my next question before I even asked it. As a next-next question:

May I ask what y'all experienced with long-running browser sessions? Or what in particular led you to believe it was unfit for this purpose?

Memory usage increases for long-running session, see this issue for more details: https://github.com/microsoft/playwright/issues/6319