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

43 lines (42 loc) 1.97 kB
/** * @class gestures * @memberof mobile */ export declare class Gestures { private vlf; private ErrorHandler; /** * @function swipe * @memberof mobile.gestures * @description Swipe from one point to another on the screen, * Ensure that the provided coordinates are within the bounds of the screen to avoid unexpected behavior. * @param {number} startX - The starting X coordinate of the swipe * @param {number} startY - The starting Y coordinate of the swipe * @param {number} endX - The ending X coordinate of the swipe * @param {number} endY - The ending Y coordinate of the swipe * @param {number} [duration=1000] - The duration of the swipe in milliseconds (optional, default is 1000ms) * @returns {Promise<void>} * @example * // Swipes from left to right across the screen horizontally (useful for image carousels or galleries). * await mobile.gestures.swipe(100, 800, 800, 800); * // Swipes from bottom to top vertically to scroll down a list. * await mobile.gestures.swipe(300, 1000, 300, 400); * // Swipes from the top down to refresh content on a mobile app (common for pull-to-refresh). * await mobile.gestures.swipe(400, 200, 400, 800); */ swipe(startX: number, startY: number, endX: number, endY: number, duration?: number): Promise<void>; /** * @function tap * @memberof mobile.gestures * @description Executes a tap at the given screen coordinates, * Ensure that the provided coordinates are within the bounds of the screen to avoid unexpected behavior. * @param {number} coordX - The horizontal screen coordinate for the tap. * @param {number} coordY - The vertical screen coordinate for the tap. * @returns {Promise<void>} * @example * await mobile.gestures.tap(100, 800); */ tap(coordX: number, coordY: number): Promise<void>; } declare const _default: Gestures; export default _default;