Appearance
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
| Parameter | Type | Description |
|---|---|---|
ctx | Context | The context object. |
Returns
void
Throws
If the context does not support keyboard actions.
Example
ts
assertKeyboardAvailable(ctx);
await ctx.page.keyboard.press('Enter');