37 lines
921 B
TypeScript
37 lines
921 B
TypeScript
|
|
import type { BaseActionParams } from './base.js';
|
||
|
|
import BaseAction from './base.js';
|
||
|
|
import type { ChainablePromiseElement } from '../../types.js';
|
||
|
|
export interface ScrollParams {
|
||
|
|
/**
|
||
|
|
* starting x coordinate
|
||
|
|
*/
|
||
|
|
x: number;
|
||
|
|
/**
|
||
|
|
* starting y coordinate
|
||
|
|
*/
|
||
|
|
y: number;
|
||
|
|
/**
|
||
|
|
* Delta X to scroll to target
|
||
|
|
*/
|
||
|
|
deltaX: number;
|
||
|
|
/**
|
||
|
|
* Delta Y to scroll to target
|
||
|
|
*/
|
||
|
|
deltaY: number;
|
||
|
|
/**
|
||
|
|
* element origin
|
||
|
|
*/
|
||
|
|
origin?: WebdriverIO.Element | ChainablePromiseElement;
|
||
|
|
/**
|
||
|
|
* duration of the scroll action in milliseconds
|
||
|
|
*/
|
||
|
|
duration: number;
|
||
|
|
}
|
||
|
|
export default class WheelAction extends BaseAction {
|
||
|
|
constructor(instance: WebdriverIO.Browser, params?: BaseActionParams);
|
||
|
|
/**
|
||
|
|
* Scrolls a page to given coordinates or origin.
|
||
|
|
*/
|
||
|
|
scroll(params?: Partial<ScrollParams>): this;
|
||
|
|
}
|
||
|
|
//# sourceMappingURL=wheel.d.ts.map
|