Home » Eclipse Projects » Jubula » Connecting two Figures on a Canvas
| Connecting two Figures on a Canvas [message #1007806] |
Thu, 07 February 2013 09: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 11: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 10:21   |
Zeb Ford-Reitz Messages: 31 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 #1015621 is a reply to message #1013084] |
Fri, 01 March 2013 07:24  |
Virginia Weidhaas Messages: 6 Registered: February 2013 |
Junior Member |
|
|
Hi,
today I had time to have a closer look to your page.
How can I change that in my Jubula, are the class names equal?
And where do I get the code and what do I need to do to get it run, change it, and have it in Jubula finally?
Maybe that sounds like stupid questions, but I'm not experienced in that area.
help would be great!
Greetings,
Virginia
|
|
|
Goto Forum:
Current Time: Sat May 18 20:38:38 EDT 2013
Powered by FUDForum. Page generated in 0.01990 seconds
|