Issue 195 in robotframework-swinglibrary: Create separate keywords for selecting from popup menus

10 views
Skip to first unread message

robotframewor...@googlecode.com

unread,
Aug 19, 2011, 7:29:34 AM8/19/11
to robotframework...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Enhancement Priority-Medium

New issue 195 by daniel.g...@gmail.com: Create separate keywords for
selecting from popup menus
http://code.google.com/p/robotframework-swinglibrary/issues/detail?id=195

In our test framework we need to be able to save a right click in a
component separately from selecting a item from the popup menu. The current
implementation of selectFromPopupMenu, and it related keywords, does both
at once. We have done a workaround by using jemmy and swinglibrary APIs
directly but it should be nice to have swinglibry supporting this feature.


robotframewor...@googlecode.com

unread,
Aug 22, 2011, 4:55:41 PM8/22/11
to robotframework...@googlegroups.com
Updates:
Status: Pending

Comment #1 on issue 195 by pekka.klarck: Create separate keywords for

If you have already implemented this, could you provide a patch? We have
just started a small iteration developing SwingLibrary further and new
keywords can easily be added. A patch with tests and docs would definitely
be accepted but just seeing the code would help a lot.

Btw, would switching SwingLibrary from Subversion to Mercurial help
contributing code?

robotframewor...@googlecode.com

unread,
Aug 23, 2011, 3:17:40 AM8/23/11
to robotframework...@googlegroups.com

Comment #2 on issue 195 by geoff.ba...@gmail.com: Create separate keywords

We have already implemented this, but in Python in our own code (PyUseCase)
so it's not really a patch yet. We're also still implementing our own
support for popups, but I'm sure we can provide a patch for this eventually.

As for Mercurial, I think it's fair to say we aren't it's biggest fans :)
but open source development is usually easier with some distributed system,
yes. If you have more choices, I'd recommend Bazaar which we use, it's more
flexible than Mercurial in how you work and handles directory structures
and changes to them in a better way.


robotframewor...@googlecode.com

unread,
Aug 31, 2011, 11:48:24 AM8/31/11
to robotframework...@googlegroups.com

Comment #4 on issue 195 by daniel.g...@gmail.com: Create separate keywords

It is very simple for us to implement this because we already have
instances of the component to be right clicked and the menu item to be
selected, see the code below. I think you can get the component instance in
the same way as you do in clickOnComponent keyword. The menu item instance
could be more difficult to obtain. You have to assume that the popup is
showing and then try to find the menu item on it.

===============================================================
from org.netbeans import jemmy

def activatePopup(self, component):
operator = jemmy.operators.ComponentOperator(component)
operator.clickForPopup()

def selectFromPopupMenu(self, menuItem):
operator = jemmy.operators.JMenuItemOperator(menuItem)
operator.push()

robotframewor...@googlecode.com

unread,
Sep 21, 2011, 12:43:10 PM9/21/11
to robotframework...@googlegroups.com

Comment #6 on issue 195 by sharifud...@gmail.com: Create separate keywords

Hi,
What is the status of this keyword enhancement.
I want to "Right Click" on a button and it popup menu items.
I am using SwingLibrary-1.2
SwingLibrary has Click on Component Keyword but it only allows double click
and single click but no "Right Click"

robotframewor...@googlecode.com

unread,
May 3, 2012, 7:25:18 AM5/3/12
to robotframework...@googlegroups.com

Comment #7 on issue 195 by janne.t....@gmail.com: Create separate
I implemented Right Click on Component in
https://github.com/robotframework/SwingLibrary/commit/a1dd0d5b3a59e67ec796fa48e518c3f620259f68

The second part, finding the dangling context menu and operating on it, is
still missing.

Reply all
Reply to author
Forward
0 new messages