Page 1 of 1

Cross Application Drag and Drop

Posted: Thu Feb 12, 2015 8:46 pm
by andrefelipe
Hi there,

I want to drag and drop from my desktop or any windows folder, to my browser, to test our file upload form. Everything is ok, the code seems to work, but when the mouse moves to the browser, looks like it loses the file.

Here is an example:

Code: Select all

repo.Desktop.File.MoveTo();
Mouse.ButtonDown(System.Windows.Forms.MouseButtons.Left);
repo.Browser.Container.MoveTo();
Mouse.ButtonUp(System.Windows.Forms.MouseButtons.Left);
I can drop from a corner in my desktop to its center, but when I try to drop it on browser, doesn't work. :(

Any suggestion ?

Thanks in advance.

Re: Cross Application Drag and Drop

Posted: Fri Feb 13, 2015 4:12 pm
by Support Team
Hi andrefelipe,

What you could try is to add a higher move time, so to use for instance the following code:
repo.Browser.Container.MoveTo(new Duration(10000));
Regards,
Markus

Re: Cross Application Drag and Drop

Posted: Wed Feb 18, 2015 11:17 am
by andrefelipe
It works, but the screen where I start drag, can't be maximized, and must be in the front. If it's maximized, drag and drop doesn't work. But it's fine, everything is running now.

Thank you very much!

Re: Cross Application Drag and Drop

Posted: Thu Feb 19, 2015 4:43 pm
by Support Team
Hi andre,

I am glad you found a way around the issue :).

Regards,
Markus