Micro Focus QTP (UFT) Forums

Full Version: How to perform drag and drop actions in qtp
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi All,
I have a two windows i.e left pane and right pane and i need to drag and drop the values from left pane to right pane
Note: These values in the right and left pane are identified as a Webelement
Could you please help me in this regard?

Thanks,
Venkat.Batchu
you can use DragAndDrop object of Mercury.DeviceReplay for this

Object.DragAndDrop(DragX,DragY,DropX,DropY,Button)
Sorry for the typo, Please read "DragAndDrop object of Mercury.DeviceReplay" as "DragAndDrop method of Mercury.DeviceReplay object"
Thanks saket ,
with your logic i have implmented as like this

Code:
Browser("xxxxxxx").Page("xxxxxxxx").Frame("main").WebElement("qqqqqqqq").Drag 350,376
Browser("xxxxxxxxx").Page("xxxxxxxxxx").Frame("main").WebElement("qqqqqqqqqqq").Drop 105,376


Thanks alot man
Nope...Thats not what saket meant. I pitched in because of the misunderstanding.

There is a undocumented feature in QTP called the DeviceReplay. Saket meant you to use that for drag and drop. Your usage is the inbuilt method of a webelement.

Research more on DeviceReplay and you will know about it.

Sorry to have surged ahead of you saket Wink..I just wanted him to be clear.
Hi All,
There are 2 Java trees from where i pick 1 element from 1 tree and other element from other tree, Then i need to drag and drop both objects into a Javatab.

I was succeeded to do in analog recording mode but since i need to use different combination of elements from 2 trees analog recording mode will not help.

I have tried to do with Mousedrag option but i always need to know to co-ordinates of the source and target which is not feasible.

So please let me know if any alternate way to succeed with drag and drop option.

Rgds,
Raj