Drag & drop problem

Ask general questions here.
SanMan
Posts: 210
Joined: Tue Apr 13, 2010 9:59 am

Drag & drop problem

Post by SanMan » Mon Nov 22, 2010 9:19 am

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?)

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

Re: Drag & drop problem

Post by Support Team » Mon Nov 22, 2010 4:37 pm

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

SanMan
Posts: 210
Joined: Tue Apr 13, 2010 9:59 am

Re: Drag & drop problem

Post by SanMan » Tue Nov 23, 2010 7:05 am

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.

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

Re: Drag & drop problem

Post by Support Team » Tue Nov 23, 2010 9:59 am

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

SanMan
Posts: 210
Joined: Tue Apr 13, 2010 9:59 am

Re: Drag & drop problem

Post by SanMan » Tue Nov 23, 2010 12:34 pm

: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:

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

Re: Drag & drop problem

Post by Support Team » Tue Nov 23, 2010 3:29 pm

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
You do not have the required permissions to view the files attached to this post.

SanMan
Posts: 210
Joined: Tue Apr 13, 2010 9:59 am

Re: Drag & drop problem

Post by SanMan » Wed Nov 24, 2010 6:44 am

:D
Many many thanks to you!
Now it works!