Page 1 of 1

Drag & drop problem

Posted: Mon Nov 22, 2010 9:19 am
by SanMan
I have a simple 3.step recording
1. Click IE title
2. Move to address address line icon and mousebutton down
3. Move to desktop and mousebutton up

-> When this recording is played, "url link icon" is drag & dropped to desktop corretly.

-> But when I copy & paste the code to UserCode.cs and run it via program.cs, no "url link icon" is created and IE window is not active after code is ran.

Code: Select all

Report.Info("Mouse Left Click item 'Internet_explore.TitleBarHotmail__Messenger__Free' at 241;8.");
repo.Internet_explore.TitleBarHotmail__Messenger__Free.Click("241;8");
Delay.Milliseconds(240);
Report.Info("Mouse Left Down item 'Internet_explore.Button205' at 8;13.");
repo.Internet_explore.Button205.MoveTo("8;13");
Mouse.ButtonDown(MouseButtons.Left);
Delay.Milliseconds(230);
Report.Info("Mouse Left Up item 'DesktopExplorer.List1' at 1589;453.");
repo.DesktopExplorer.List1.MoveTo("1589;453");
Mouse.ButtonUp(MouseButtons.Left);
Delay.Milliseconds(300);
Should I add something to my UserCode.cs? (EnsureVisible?)

Re: Drag & drop problem

Posted: Mon Nov 22, 2010 4:37 pm
by Support Team
Hi SanMan,
we can't reproduce this issue but maybe 'EnsureVisible' causes problems when you drag 'n drop to the desktop. Try setting the 'Use Ensure Visible' property for the desktop repository item to 'false'.

Best regards,
Christian
Ranorex Team

Re: Drag & drop problem

Posted: Tue Nov 23, 2010 7:05 am
by SanMan
It did not help when set the 'Use Ensure Visible' property for the desktop repository item to 'false'.

When url link icon is dragged to desktop, IE window closes and nothing is dropped to desktop.

I am using external monitor on my Win7 laptop.

Re: Drag & drop problem

Posted: Tue Nov 23, 2010 9:59 am
by Support Team
Sorry, I think I wasn't precisely enough. Disable 'Use Ensure Visible' on the "DesktopExplorer.List1" repository item, which is the item the mouse is moved to.

Best regards
Christian
Ranorex Team

Re: Drag & drop problem

Posted: Tue Nov 23, 2010 12:34 pm
by SanMan
:cry:

It did not help either.

Mouse pointer just moves to desktop but no URL-link is dropped to desktop. Same problem when occures when trying to drag&drop the link to Word.

Recording works but when copy pasted to user code... :cry:

Re: Drag & drop problem

Posted: Tue Nov 23, 2010 3:29 pm
by Support Team
Hi,

have you tried to disable the "Use Ensure Visible" property on both repository items, DesktopExplorer->List1 and <Yor Word Document>->ElementWINWORD in the properties dialog of those repository items? I've tried it out by myself and it has worked as expected.
ensureVisible.jpg
I hope this works for you.

Regards,
Tobias
Support Team

Re: Drag & drop problem

Posted: Wed Nov 24, 2010 6:44 am
by SanMan
:D
Many many thanks to you!
Now it works!