Forum Discussion
tristaanogre
9 years agoEsteemed Contributor
The "Drag" method common on any on screen objects in TestComplete only operates using X,Y co-ordinates for the start position and the end position. So, unfortunately, there's no way to do what you are asking "out of the box".
If you know the objects both of the source and the destination and the screen-coordinates of them both, it should be something like
MySourceObject.Drag(1,1,MySourceObject.Top - MyDestinationObject.Top, MySourceObject.Left - MyDestinationObject.Left)
The first two parameters say to just grab your object at point 1,1 relative to the object. The second parameters do a bit of basic math to calculate the X distance and the Y distance for your travel.