How to perform Drag and Drop operation

Ranorex Spy, Recorder, and Studio.
kucerm
Posts: 2
Joined: Mon Jun 08, 2009 3:54 pm

How to perform Drag and Drop operation

Post by kucerm » Mon Jun 08, 2009 4:05 pm

Hello,

I cannot find how to perform a Drag 'n Drop operation on "Ranorex.Adapter" component. Is there any possibility to do this?
I'm able to do only single click

Code: Select all

private static void SingleClick(Ranorex.Adapter graph, int x, int y) {
graph.Click(new Location(x,y));
Thank you for any help,

Matous

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Post by Support Team » Mon Jun 08, 2009 4:29 pm

You can do drag and drop operations like this:

- Mouse.MoveTo(yourSourceElement, [location in your source element])
- Mouse.ButtonDown(MouseButtons.Left)
- Mouse.MoveTo(yourTargetElement, [location in your targetelement])
- Mouse.ButtonUp(MouseButtons.Left)

Michael
Ranorex Team

kucerm
Posts: 2
Joined: Mon Jun 08, 2009 3:54 pm

Post by kucerm » Tue Jun 09, 2009 7:15 am

Thank you very much for help. This led to success :-)

MK