UNPKG

@sap_oss/wdio-qmate-service

Version:

[![REUSE status](https://api.reuse.software/badge/github.com/SAP/wdio-qmate-service)](https://api.reuse.software/info/github.com/SAP/wdio-qmate-service)[![Node.js CI](https://github.com/SAP/wdio-qmate-service/actions/workflows/node.js.yml/badge.svg)](http

107 lines (105 loc) 4.49 kB
/** * @class userInteraction * @memberof common */ export declare class UserInteraction { private vlf; private ErrorHandler; /** * @function fillActive * @memberOf common.userInteraction * @description Fills the active input with the given value. * @param {String | Number} value - The value to enter. * @example await common.userInteraction.fillActive("My Value"); */ fillActive(value: string | number): Promise<void>; /** * @function fillActiveAndRetry * @memberOf common.userInteraction * @description Enters the given value to the active input field and retries the action in case it fails. * @param {String} value - The value to enter. * @param {Number} [retries=3] - The number of retries, can be set in config for all functions under params stepsRetries. * @param {Number} [interval=5000] - The delay between the retries (ms). Can be set in config for all functions under params.stepRetriesIntervals. * @example await common.userInteraction.fillActiveAndRetry("My Value"); */ fillActiveAndRetry(value: string, retries?: number, interval?: number): Promise<void>; /** * @function clearAndFillActive * @memberOf common.userInteraction * @description Clears and fills the active input. * @param {String} value - The value to fill. * @example await common.userInteraction.clearAndFillActive("My Value"); */ clearAndFillActive(value: string): Promise<void>; /** * @function clearAndFillActiveAndRetry * @memberOf common.userInteraction * @description CClears and fills the active input. Retries the action in case of a failure. * @param {String} value - The value to fill. * @param {Number} [retries=3] - The number of retries, can be set in config for all functions under params stepsRetries. * @param {Number} [interval=5000] - The delay between the retries (ms). Can be set in config for all functions under params.stepRetriesIntervals. * @example await common.userInteraction.clearAndFillActiveAndRetry("My Value"); */ clearAndFillActiveAndRetry(value: string, retries?: number, interval?: number): Promise<void>; /** * @function pressKey * @memberOf common.userInteraction * @description Performs the specified keypress. Possible values: <a href="https://w3c.github.io/webdriver/#keyboard-actions" target="_blank">WebDriver Keyboard Actions</a> * @param {String | String[]} keys - The key or combination of keys to execute. * @example await common.userInteraction.pressKey("Enter"); * @example await common.userInteraction.pressKey("\uE004"); * @example await common.userInteraction.pressKey(["\uE009", "Alt"]); */ pressKey(keys: string | string[]): Promise<void>; /** * @function pressEnter * @memberOf common.userInteraction * @description Performs the Enter keypress. * @example await common.userInteraction.pressEnter(); */ pressEnter(): Promise<void>; /** * @function pressTab * @memberOf common.userInteraction * @description Performs the Tab keypress. * @example await common.userInteraction.pressTab(); */ pressTab(): Promise<void>; /** * @function pressF4 * @memberOf common.userInteraction * @description Performs the F4 keypress. * @example await common.userInteraction.pressF4(); */ pressF4(): Promise<void>; /** * @function pressBackspace * @memberOf common.userInteraction * @description Performs the Backspace keypress. * @example await common.userInteraction.pressBackspace(); */ pressBackspace(): Promise<void>; /** * @function pressEscape * @memberOf common.userInteraction * @description Performs the Escape keypress. * @example await common.userInteraction.pressEscape(); */ pressEscape(): Promise<void>; /** * @function pressArrowLeft * @memberOf common.userInteraction * @description Performs the Arrow Left keypress. * @example await common.userInteraction.pressArrowLeft(); */ pressArrowLeft(): Promise<void>; /** * @function pressArrowRight * @memberOf common.userInteraction * @description Performs the Arrow Right keypress. * @example await common.userInteraction.pressArrowRight(); */ pressArrowRight(): Promise<void>; } declare const _default: UserInteraction; export default _default;