Cross Application Drag and Drop

Ask general questions here.
andrefelipe
Posts: 13
Joined: Tue Feb 03, 2015 6:00 pm

Cross Application Drag and Drop

Post by andrefelipe » Thu Feb 12, 2015 8:46 pm

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.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Cross Application Drag and Drop

Post by Support Team » Fri Feb 13, 2015 4:12 pm

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

andrefelipe
Posts: 13
Joined: Tue Feb 03, 2015 6:00 pm

Re: Cross Application Drag and Drop

Post by andrefelipe » Wed Feb 18, 2015 11:17 am

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!

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Cross Application Drag and Drop

Post by Support Team » Thu Feb 19, 2015 4:43 pm

Hi andre,

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

Regards,
Markus