Skip to navigation

saveState

Referenced In

Fields

FieldTypeDescriptionDefault
saveStateone of:
- string
- object(Save state (detailed))
Required. Save the open site’s cookies and localStorage to a JSON file in Playwright’s storageState format, so later tests can sign in with loadState.—

Examples

{
"saveState": "auth.json"
}
{
"saveState": {
"path": "auth.json",
"directory": "../.auth",
"overwrite": true
}
}