Page tree
Skip to end of metadata
Go to start of metadata


This command allows you to drag an element or text from a specified zone and drop it on another element.





ZonestringSelect Zone - Native or Web
DragElementstringThe xpath identifier of the element to be dragged

Specify index if the element appears more than once

DropElementstringThe xpath identifier of the element onto which the previous element will be dropped
Specify index if the element appears more than once


You can use this command to test drag drop scenarios if your app allows that (i.e. your app is a game that incorporates the dragging and dropping of elements).


Set Experitest Url

Please make sure you replace <EXPERITEST_URL> with appropriate URL in the code snippet below.

Usage of DragDrop Command
driver = new AndroidDriver(new URL("<EXPERITEST_URL>"), dc);
seetest = new SeeTestClient(driver);


// specify how much time should pass before the drag action starts
// this ensures that the dragged elements is caught
// locate the element at coordinates x: 250, y: 100 and clicks on it three times
seetest.dragDrop("NATIVE", "xpath=//*[@text='DemoUI']", 0, "xpath=//*[@text='EriBank']", 0);

In this example, dragging the DemoUi element on top of the EriBank element will create a folder that contains them both.

  • No labels