UNPKG

@serenity-js/web

Version:

Serenity/JS Screenplay Pattern library offering a flexible, web driver-agnostic approach for interacting with web-based user interfaces and components, suitable for various testing contexts

77 lines 2.66 kB
/** * Represents keyboard keys that aren't text, and that can be used with the [interaction](https://serenity-js.org/api/core/class/Interaction/) to [`Press`](https://serenity-js.org/api/web/class/Press/). * * **Note:** Modifier keys like [`Key.Shift`](https://serenity-js.org/api/web/class/Key/#Shift), [`Key.Alt`](https://serenity-js.org/api/web/class/Key/#Alt) and [`Key.Meta`](https://serenity-js.org/api/web/class/Key/#Meta) (a.k.a. "Command" on Mac) will stay pressed, * so there's no need to depress them. * * ## Learn more * * - [`Press`](https://serenity-js.org/api/web/class/Press/) * - [`Page.sendKeys`](https://serenity-js.org/api/web/class/Page/#sendKeys) * - [W3C WebDriver Spec: Keyboard Actions](https://w3c.github.io/webdriver/webdriver-spec.html#keyboard-actions) * - [Selenium WebDriver: Inputs](https://github.com/SeleniumHQ/selenium/blob/trunk/javascript/node/selenium-webdriver/lib/input.js#L46) * - [WebdriverIO: Constants](https://github.com/webdriverio/webdriverio/blob/main/packages/wdio-utils/src/constants.ts#L5) * * @group Models */ export declare class Key { readonly devtoolsName: string; readonly utf16codePoint: string; readonly isModifier: boolean; static Alt: Key; static ArrowDown: Key; static ArrowLeft: Key; static ArrowRight: Key; static ArrowUp: Key; static Backspace: Key; static Cancel: Key; static Clear: Key; static Control: Key; static Delete: Key; static End: Key; static Enter: Key; static Escape: Key; static F1: Key; static F2: Key; static F3: Key; static F4: Key; static F5: Key; static F6: Key; static F7: Key; static F8: Key; static F9: Key; static F10: Key; static F11: Key; static F12: Key; static Help: Key; static Home: Key; static Insert: Key; static Meta: Key; static Numpad0: Key; static Numpad1: Key; static Numpad2: Key; static Numpad3: Key; static Numpad4: Key; static Numpad5: Key; static Numpad6: Key; static Numpad7: Key; static Numpad8: Key; static Numpad9: Key; static NumpadAdd: Key; static NumpadDecimal: Key; static NumpadDivide: Key; static NumpadEqual: Key; static NumpadMultiply: Key; static NumpadSubtract: Key; static PageDown: Key; static PageUp: Key; static Pause: Key; static Semicolon: Key; static Shift: Key; static Space: Key; static Tab: Key; static isKey(maybeKey: unknown): maybeKey is Key; constructor(devtoolsName: string, utf16codePoint: string, isModifier?: boolean); toString(): string; } //# sourceMappingURL=Key.d.ts.map