@@ -16,6 +16,10 @@ export declare class UIElement {
16
16
* Click on element
17
17
*/
18
18
click ( ) : Promise < any > ;
19
+ getCenter ( ) : Promise < {
20
+ x : number ;
21
+ y : number ;
22
+ } > ;
19
23
tapCenter ( ) : Promise < void > ;
20
24
tapAtTheEnd ( ) : Promise < void > ;
21
25
/**
@@ -26,17 +30,22 @@ export declare class UIElement {
26
30
*/
27
31
tap ( ) : Promise < any > ;
28
32
/**
33
+ * @experimental
29
34
* Double tap on element
30
35
*/
31
36
doubleTap ( ) : Promise < any > ;
37
+ longPress ( duration : number ) : Promise < void > ;
32
38
/**
33
39
* Get location of element
34
40
*/
35
41
location ( ) : Promise < Point > ;
36
42
/**
37
43
* Get size of element
38
44
*/
39
- size ( ) : Promise < Point > ;
45
+ size ( ) : Promise < {
46
+ width : number ;
47
+ height : number ;
48
+ } > ;
40
49
/**
41
50
* Get text of element
42
51
*/
@@ -113,13 +122,6 @@ export declare class UIElement {
113
122
*/
114
123
scrollTo ( direction : Direction , elementToSearch : ( ) => Promise < UIElement > , yOffset ?: number , xOffset ?: number , retries ?: number ) : Promise < UIElement > ;
115
124
/**
116
- * Drag element with specific offset
117
- * @param direction
118
- * @param yOffset
119
- * @param xOffset - default value 0
120
- */
121
- drag ( direction : Direction , yOffset : number , xOffset ?: number ) : Promise < void > ;
122
- /**
123
125
* Click and hold over an element
124
126
* @param time in milliseconds to increase the default press period.
125
127
*/
@@ -164,5 +166,51 @@ export declare class UIElement {
164
166
* Swipe element left/right
165
167
* @param direction
166
168
*/
167
- swipe ( direction : Direction ) : Promise < void > ;
169
+ swipe ( direction : "up" | "down" | "left" | "right" ) : Promise < void > ;
170
+ /**
171
+ * Drag element with specific offset
172
+ * @experimental
173
+ * @param direction
174
+ * @param yOffset
175
+ * @param xOffset - default value 0
176
+ */
177
+ drag ( direction : Direction , yOffset : number , xOffset ?: number ) : Promise < void > ;
178
+ /**
179
+ *@experimental
180
+ * Pan element with specific offset
181
+ * @param points where the finger should move to.
182
+ * @param initPointOffset element.getRectangle() is used as start point. In case some additional offset should be provided use this param.
183
+ */
184
+ pan ( points : {
185
+ x : number ;
186
+ y : number ;
187
+ } [ ] , initPointOffset ?: {
188
+ x : number ;
189
+ y : number ;
190
+ } ) : Promise < void > ;
191
+ /**
192
+ * @experimental
193
+ * This method will try to move two fingers from opposite corners.
194
+ * One finger starts from
195
+ * { x: elementRect.x + offset.x, y: elementRect.y + offset.y }
196
+ * and ends to
197
+ * { x: elementRect.x + elementRect.width - offset.x, y: elementRect.height + elementRect.y - offset.y }
198
+ * and the other finger starts from
199
+ * { x: elementRect.width + elementRect.x - offset.x, y: elementRect.height + elementRect.y - offset.y }
200
+ * and ends to
201
+ * { x: elementRect.x + offset.x, y: elementRect.y + offset.y }
202
+ */
203
+ rotate ( offset ?: {
204
+ x : number ;
205
+ y : number ;
206
+ } ) : Promise < void > ;
207
+ /**
208
+ * @experimental
209
+ * @param zoomFactory - zoomIn or zoomOut. Only zoomIn action is implemented
210
+ * @param offset
211
+ */
212
+ pinch ( zoomType : "in" | "out" , offset ?: {
213
+ x : number ;
214
+ y : number ;
215
+ } ) : Promise < void > ;
168
216
}
0 commit comments