Home » Archived » Jubula » Connecting two Figures on a Canvas
Connecting two Figures on a Canvas [message #1007806] |
Thu, 07 February 2013 14:52 |
Virginia Weidhaas Messages: 6 Registered: February 2013 |
Junior Member |
|
|
Hi,
I'm using Jubula with an RCP AUT containing a canvas.
I'm dragging and dropping figures from a Tree on the canvas (that works).
However, on the canvas I can usually connect two figures with little Attached Anchors.
I found out the names of those via the GEF Inspector, they are called org.eclipse.graphiti.ui.internal.parts.ContainerShapeEditPart_1/org.eclipse.graphiti.ui.internal.parts.AdvancedAnchorEditPart_1
So it's always the same way, dependent of the name of the Editpart of course.
I want to connect two anchors.
I thought ub_fcv_ClickConnection_byTextpaths would exactly be what I was looking for,
but when I try it, it says the Test failed, it couldn't find the textpaths.
When I try another simple action with the textpath like "Click in Figure", it works.
What is Click Connection doing?
My second approach was to use "Drag and Drop", since it is nearly the same approach, you click on an anchor, and drag it to the second anchor, where you can finally let go of the mouse.
I tried ub_fcv_dragFigure_byTextpath(TEXT,OPERATOR) and fcv_dropOnFigure_by Textpath(TEXT,OPERATOR).
The test suceeds although nothing happened, I guess the drag and drop action is too fast for my AUT.
To get a delay, I choose the version of ub_fcv_dragFigure_byTextpath with the many parameters ( TEXTPATH,OPERATOR,MOUSE_BUTTON,MODIFIER_KEYS,X_POSITION;X_UNITS,Y_POSITION;Y_UNITS)
and ub_fcv_dropFigure_byTextpath(TEXTPATH,OPERATOR,MOUSE_BUTTON,MODIFIER_KEYS,X_POSITION;X_UNITS,Y_POSITION;Y_UNITS,DELAY_BEFORE_DROP).
However, it seems it does not select the Anchor correctly, it is always a bit off the edges. I tried several combinations of X_POSITION/Y_POSITION but nothing worked.
How can I connect my anchors? If that worked, it would be the perfect testing tool;)
Jubula Standalone Version: Version: 1.3.0
on Windows 7.
Thanks for your help in advance,
Virginia
|
|
| | |
Re: Connecting two Figures on a Canvas [message #1012485 is a reply to message #1008365] |
Thu, 21 February 2013 16:41 |
Virginia Weidhaas Messages: 6 Registered: February 2013 |
Junior Member |
|
|
Hi,
thank you very much for your reply, unfortunately I didn't notice it earlier.
I have no access to the system at the moment, but I tried to sketch it quickly:
(oh no, I can't use Links yet....well, try this one
i1045.photobucket.com/albums/b455/birkenblatt/screenshot.jpg
There are two (ore more) figures with each of them with an anchor. You can use both for connecting.
When you click (and hold) on one of the anchors, an orange line appears which you can drag to another anchor and drop. Then the real line appears and the connection is made.
With the drag and drop action in Jubula, it selects the right anchor, but that orange line doesn't appear, only when I move the mouse a bit during delay.
I don't know much about the internals, it is just a canvas created with Graphiti as far as I know, and the description of the Anchor in the GEF Inspector is in my first post.
Please ask if you need further details, I would be really happy to solve that problem
Best regards,
Virginia
|
|
| |
Re: Connecting two Figures on a Canvas [message #1012989 is a reply to message #1012485] |
Fri, 22 February 2013 15:21 |
Zeb Ford-Reitz Messages: 33 Registered: November 2010 |
Member |
|
|
Hi Virginia,
It sounds like the AUT's UI isn't picking up on the mouse's location before dragging and/or dropping. We've had similar sounding drag and drop problems in the past (see https://bxapps.bredex.de/bugzilla/show_bug.cgi?id=129 - full disclosure, that link points to the GUIdancer bugzilla, as this bug was never reported for Jubula). The solution (in code, unfortunately, rather than configuration) was generally what we started referring to as a "mouse shake" (i.e. displacing the mouse cursor slightly and then moving it back in order to ensure that the UI is caught up), which compensates for the general instability of "warping" the mouse cursor from point A to point B with no intermediate stops. The bug that I linked to doesn't describe your problem exactly, but the fix would probably be similar (i.e. "shake" the mouse before dragging, in addition to before dropping).
If this is something reproducible, then it's probably worth filing a bug with Jubula, optimally with a small AUT that demonstrates the problem.
- Zeb
|
|
| | | | | |
Re: Connecting two Figures on a Canvas [message #1079962 is a reply to message #1072617] |
Mon, 05 August 2013 09:40 |
Sanjay Krishnankutty Messages: 1 Registered: August 2013 |
Junior Member |
|
|
Hi,
I'm experiencing the same problem as Virginia when trying to connect two figures using Drag and Drop. This is my test case:
Drag:
<ub_fcv_dragFigure_byTextpath> [org.eclipse.graphiti.ui.internal.parts.ContainerShapeEditPart_4/org.eclipse.graphiti.ui.internal.parts.FixPointAnchorEditPart_1, equals, 1, none, 50, percent, 50, percent]
Drop:
<ub_fcv_dropOnFigure_byTextpath> [org.eclipse.graphiti.ui.internal.parts.ContainerShapeEditPart_3, equals, 50, percent, 50, percent, 5000]
The mouse moves onto the second object and stays there, it's as if the drop action never happened. But if I move the mouse during the 5000ms interval, then the connection is successfully made in the diagram.
David's workaround is not applicable to my problem, my canvas is small and the drag&drop action doesn't involve scrolling through the diagram.
|
|
| |
Goto Forum:
Current Time: Thu Mar 28 20:44:18 GMT 2024
Powered by FUDForum. Page generated in 0.04322 seconds
|