new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Playwright · all subjects

authentication/setup

3 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

Authentication state storage directory and .gitignore

Store authenticated browser state in a `playwright/.auth` directory. Add `playwright/.auth` to `.gitignore` to prevent checking in sensitive cookies and headers that could be used to impersonate accounts.

Browser contexts provide test isolation

Playwright executes tests in isolated environments called browser contexts. This isolation model improves reproducibility and prevents cascading test failures. Tests can load existing authenticated state to eliminate re-authentication and speed up test execution.

Authentication state reuse pattern with playwright-cli

To reuse authentication state: (1) Open login page, interact with login form using fill and click commands, then save state with 'playwright-cli state-save auth.json'. (2) In later sessions, load state with 'playwright-cli state-load auth.json' then open the application. The user will already be logged in because cookies and localStorage are restored.

Give your agent this brain