getState
Available from testplane v8.40.0
Overview
A browser command that restores the session state from a file which previously saved using the saveState command.
Usage
import type { SaveStateData } from "testplane";
const stateDump: SaveStateData = await browser.getState({
path: "./stateDump.json",
});
Command Parameters
| Name | Type | Default | Description |
| path | string | - | Path to file with state. |
Usage Examples
Save state in file.
it("test", async ({ browser }) => {
const stateData = await browser.getState({
path: "./stateDump.json",
});
});