Skip to content

Function: assertKeyboardAvailable()

ts
function assertKeyboardAvailable(ctx: Context): void;

Defined in: src/utils/pageAccess.ts:34

Assert that keyboard actions are available on the context page. Throw if not.

Parameters

ParameterTypeDescription
ctxContextThe context object.

Returns

void

Throws

If the context does not support keyboard actions.

Example

ts
assertKeyboardAvailable(ctx);
await ctx.page.keyboard.press('Enter');

Matterway Assistant SDK Documentation