|
|
|
Re: Find controls when GMF context menu is displayed [message #981400 is a reply to message #981384] |
Mon, 12 November 2012 11:30 |
|
On 11/12/2012 12:18 PM, Ralph Gerbig wrote:
> My problem is that I cannot click on such a context menu button because
> SWTBot finder does not seem to find any widget while this dialog is
> open. Is there a way to locate the bug a bit closer when I want to open
> a bug report?
I'm not sure what you mean by contextMenu then... contextMenu does not
have button nor widgets, they have menus instead (contextMenu are menu
displayed with right-click).
In case of context menu as "right-clicks", then when a contextMenu is
open you cannot perform any other operation since it has the focus. When
you right-click on something, it sends a right-click event that opens
the contextMenu. When you perform any other UI operation, the
contextMenu is generally first closed and then your event is processed
normally. Maybe in your case, you need to explicitly close the menu...
In case you're speaking about widgets on a draw2d diagram, then SWTBot
does not support them. SWTBot APIs don't have draw2d concepts.
However, you can perform some mouse move and click operations on a
draw2d diagram.
I don't understand what you mean by "locate the bug a bit closer".
Cheers
--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
|
|
|
|
Re: Find controls when GMF context menu is displayed [message #982667 is a reply to message #982603] |
Tue, 13 November 2012 10:08 |
|
On 11/13/2012 10:09 AM, Ralph Gerbig wrote:
> Hi Mickael,
>
> what you see in the screenshot is a GMF PopupMenu
Sorry, I missed the attachment in original mail. Now I saw it,
understand clearly what you are meaning ;)
> editor.bot().menu("Class.field");
I'd try, with part being the SWTBotGefEditPart you want to right-click:
part.select() or part.click() then
gefEditor.getSWTBotGefViewe().clickContextMenu("Class.field"), or
gefEditor.getSWTBotGefViewe().getCanvas().contextMenu("Class.field").click()
The Canvas is a SWT widget so SWTBotGefFigureCanvas inherits from
AbstractSWTBot.
HTH,
--
Mickael Istria
JBoss, by Red Hat
My blog: http://mickaelistria.wordpress.com
My Tweets: http://twitter.com/mickaelistria
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02243 seconds