Drag(Zone, Element, Index, XOffset, YOffset)
|
|
|
|
|
|
|
Drag an element or text in a specified zone (you can drag the second, third, etc appearance of the element by setting Index to 1, 2, etc)
Zone - Select Zone
Element - Select Element from drop-down list OR (for OCR text identification) insert text into the empty box in the drop down list
Index - Element Order (the number of times the element appears more than once)
XOffset - Horizontal Offset from the Element in screen pixels (negative values are possible, can use P2cx to convert screen percentage to pixels)
YOffset - Vertical Offset from the Element in screen pixels (negative values are possible, can use P2cy to convert screen percentage to pixels)
Scenario : In the following example, we will use the drag command together with the SetDragStartDelay command in order to move the Play Store icon across the device's springboard.
Command usage: We will first use the SetDragStartDelay command in order to press the element for 1000 milliseconds before starting the drag. We will then use the Drag command with the following configurations:
Parameters:
Zone - will be set to NATIVE
Element - will be set to xpath=//*[@text='Play Store'] in order to identify the Play Store icon element
Index - will be set to 0
XOffset - X drag offset - will be set to 200 (200 pixels drag to the right)
YOffset - Y drag offset - will be set to -300 (300 pixels drag in the up direction)
This will be the result of the sequence: