Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/pptr/src/Page.ts>Page#emulateIdleState

Headless Chrome Deno API
Latest
method Page.prototype.emulateIdleState
import { Page } from "https://deno.land/x/pptr@1.2.0/src/Page.ts";

Emulates the idle state. If no arguments set, clears idle state emulation.

Examples

Example 1

// set idle emulation
await page.emulateIdleState({isUserActive: true, isScreenUnlocked: false});

// do some checks here
...

// clear idle emulation
await page.emulateIdleState();

Parameters

optional
overrides: { isUserActive: boolean; isScreenUnlocked: boolean; }

Mock idle state. If not set, clears idle overrides

Returns

Promise<void>