Micro Focus QTP (UFT) Forums
How to perform drag and drop actions in qtp - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: UFT / QTP Others (https://www.learnqtp.com/forums/Forum-UFT-QTP-Others)
+--- Thread: How to perform drag and drop actions in qtp (/Thread-How-to-perform-drag-and-drop-actions-in-qtp)



How to perform drag and drop actions in qtp - venkatbatchu - 08-12-2009

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


RE: How to perform drag and drop actions in qtp - Saket - 08-12-2009

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"


RE: How to perform drag and drop actions in qtp - venkatbatchu - 10-25-2009

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


RE: How to perform drag and drop actions in qtp - basanth27 - 10-26-2009

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.


RE: How to perform drag and drop actions in qtp - sbheem - 12-20-2010

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