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

x/pptr/mod.ts>Page#emulateIdleState

Headless Chrome Deno API
Latest
method Page.prototype.emulateIdleState
Re-export
import { Page } from "https://deno.land/x/pptr@1.2.0/mod.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>