How to handle the drag and drop control

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
manideep
Posts: 5
Joined: Wed Jan 21, 2015 6:53 am

How to handle the drag and drop control

Post by manideep » Wed Mar 11, 2015 7:12 am

hi,
I have a control with drag and drop functionality ,after drag and drop the item i have to check the sorting order of the list . i have attached screen shot. i need to drag the icons marked in the red to top and bottom.
Attachments
Untitled.png
Untitled.png (49.34 KiB) Viewed 999 times

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

Re: How to handle the drag and drop control

Post by Support Team » Fri Mar 13, 2015 1:44 pm

Hi manideep,

There are multiple possibilities in order to do that, but it depends on how the elements are represented in your Application.
You can, for example use a validate exists action for each element and use a special RanoreXPath.

For example:
/form[@title='Ranorex']//element[@name='Message Read' and @childindex=8]

If the element is not in the correct position the test will fail.
Please let me know if I don't understand your question correctly.

Regards,
Bernhard
.
Image

manideep
Posts: 5
Joined: Wed Jan 21, 2015 6:53 am

Re: How to handle the drag and drop control

Post by manideep » Thu Mar 26, 2015 8:12 am

.//div[#'wms_dragHandle49']/i[@title='Drag To Move'] is the ranorex path for first image and //div[#'wms_dragHandle50']/i[@title='Drag To Move'] is the path for second image
we should click and drag the first image and leave the mouse button in the place of second image...
pls post asap.....

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

Re: How to handle the drag and drop control

Post by Support Team » Fri Mar 27, 2015 5:45 pm

Hello manideep,

I suggest using the Mouse Down and Mouse Up action in order to move an item to another place.
This should do the trick.
MouseDownUp.png
MouseDownUp.png (14.97 KiB) Viewed 933 times
Regards,
Bernhard
.
Image