Method Swipe

Performs Swipe operation in a view from start position (X,Y) to end position (X,Y)

Usage

Function Swipe( 
        Integer StartX,
        Integer StartY,
        Integer EndX,
        Integer EndY,
        Integer MsSpeed [Optional],
        Integer MsHoldBeforeSwiping [Optional],
        Boolean Report [Optional]
)

Step

ZAP Object step

ScrollTo

100

100

500

500

1500

100

true

Integer StartX

Integer StartY

Integer EndX

Integer EndY

Integer MsSpeed [Optional]

Boolean MsHoldBeforeSwiping [Optional]

Boolean Report [Optional]

Parameters

StartX

Type: Integer

X of the start point

StartY

Type: Integer

Y of the start point

EndX

Type: Integer

X of the end point

EndY

Type: Integer

Y of the end point

MsSpeed (optional)

Type: Integer

Default value: 1500

How long should it take to swipe (in milliseconds)

MsHoldBeforeSwiping (optional)

Type: Integer

Default value: 100

Hold mouse at starting position before swiping (in milliseconds)

Report (optional)

Type: Boolean

Default value: True

Report this step to Test Results

Returns

No return value

Example

VBScript

Application("Demo").Swipe 100, 100, 500, 500
'Set swipe speed
Application("Demo").Swipe 100, 100, 500, 500, 1000
'Set hold parameter before swiping
Application("Demo").Swipe 100, 100, 500, 500, 1000, 500
'Exclude this step from report
Application("Demo").Swipe 100, 100, 500, 500, 1000, 500, false

JavaScript

Application("Demo").Swipe(100, 100, 500, 500);
// Set swipe speed
Application("Demo").Swipe(100, 100, 500, 500, 1000);
// Set hold parameter before swiping
Application("Demo").Swipe(100, 100, 500, 500, 1000, 500);
// Exclude this step from report
Application("Demo").Swipe(100, 100, 500, 500, 1000, 500, false);

Step

ZAP Object step

Swipe

100

100

500

500

Script-Less next step

Comment

Set speed, hold before swipe and report parameters

Script-Less next step

Step

ZAP Object step

Swipe

100

100

500

500

1000

500

true