I'm currently looking to automate testing of drag and drop functionality when it comes to uploading files. The idea obviously being that you drag a file from explorer and drop it in the specified area on the web page. I've found other threads here that are useful in pointing me in the right direction with regards to the actual drag and drop (using speficied mouse related actions) but there is still one thing I'm not clear on: in order to do this I'll have to have both windows visible so that the file can be dragged from one to the other.
Opening each individual window is easy enough but what I would like to do is dock one of them to the left side of the screen and the other to fill the rest of the space as windows currently seems to allow. Then the dragging ought to be easy. Trying to record it however doesn't seem to provide anything particularly useful. The title bar of window (Edge in this case) is shown as the element being dragged and in both the down and up mouse actions, but the locations listed in the recording don't seem to change between the two despite me dragging the window to the left.
How do I go about setting up the two windows in this way? Does anybody have any pointers?
Docking browser windows
Re: Docking browser windows
Hi,
I think that docking the window will actually over-complicate the drag&drop operation. It should be possible to perform D&D between windows by using technique, described in this post:
drag-and-drop-files-t10284.html#p41301
- use mouse Move to desired position in window A
- use mouse Down action to init the drag operation
- use EnsureVisible on window B, which should set it on top and active
- use mouse Up action in window B, which should drop the dragged item in window B
Hope this helps?
I think that docking the window will actually over-complicate the drag&drop operation. It should be possible to perform D&D between windows by using technique, described in this post:
drag-and-drop-files-t10284.html#p41301
- use mouse Move to desired position in window A
- use mouse Down action to init the drag operation
- use EnsureVisible on window B, which should set it on top and active
- use mouse Up action in window B, which should drop the dragged item in window B
Hope this helps?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Docking browser windows
That could well end up helping. Thank you.
Re: Docking browser windows
Hi seurrep,
I would just like to add... If you do need to arrange your windows to occupy each half of the screen, then you can do this by telling Ranorex to focus one window by clicking on it, hold down "LWin", press "Left", release "LWin", click on the 2nd window, hold down "LWin", press "Right" and release "LWin":
Regards,
McTurtle
I would just like to add... If you do need to arrange your windows to occupy each half of the screen, then you can do this by telling Ranorex to focus one window by clicking on it, hold down "LWin", press "Left", release "LWin", click on the 2nd window, hold down "LWin", press "Right" and release "LWin":
Regards,
McTurtle
You do not have the required permissions to view the files attached to this post.
Re: Docking browser windows
You could do each key sequence in one step also, for cleanliness.
and
Code: Select all
{LWin down}{Left}{LWin up}
Code: Select all
{LWin down}{Right}{LWin up}