UNPKG

@qavajs/steps-playwright

Version:

qavajs steps to interact with playwright

20 lines (17 loc) 478 B
import { When } from '@qavajs/core'; /** * Press and hold keyboard key * @param {string} key - key to press * @example When I hold down 'Q' key */ When('I hold down {string} key', async function (key) { await this.playwright.page.keyboard.down(key); }); /** * Release keyboard key * @param {string} key - key to release * @example When I release 'A' key */ When('I release {string} key', async function (key) { await this.playwright.page.keyboard.up(key); });