1 | import type { ElementReference } from '@wdio/protocols';
|
2 | export type ActionType = 'key' | 'pointer' | 'wheel';
|
3 | export type KeyActionType = 'mouse' | 'pen' | 'touch';
|
4 | export interface ActionParameters {
|
5 | pointerType?: KeyActionType;
|
6 | }
|
7 | export interface BaseActionParams {
|
8 | id?: string;
|
9 | parameters?: ActionParameters;
|
10 | }
|
11 | interface Sequence {
|
12 | type: string;
|
13 | duration?: number;
|
14 | origin?: (ElementReference | WebdriverIO.Element | 'pointer' | 'viewport') & {
|
15 | then?: Function;
|
16 | };
|
17 | value?: string;
|
18 | }
|
19 | export default class BaseAction {
|
20 | #private;
|
21 | protected instance: WebdriverIO.Browser;
|
22 | protected sequence: Sequence[];
|
23 | constructor(instance: WebdriverIO.Browser, type: ActionType, params?: BaseActionParams);
|
24 | toJSON(): {
|
25 | id: string;
|
26 | type: ActionType;
|
27 | parameters: ActionParameters;
|
28 | actions: Sequence[];
|
29 | };
|
30 | |
31 |
|
32 |
|
33 |
|
34 | pause(duration: number): this;
|
35 | |
36 |
|
37 |
|
38 |
|
39 | perform(skipRelease?: boolean): Promise<void>;
|
40 | }
|
41 | export {};
|
42 |
|
\ | No newline at end of file |