Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Jubula » Is there a way to select a context menu item of an already opened context menu?
Is there a way to select a context menu item of an already opened context menu? [message #732288] Tue, 04 October 2011 12:26 Go to next message
Victor Martin is currently offline Victor MartinFriend
Messages: 29
Registered: July 2009
Junior Member
All the context menu steps I found in Jubula required a mouse button parameter.
I need to be able to execute an Application Key Combination (i.e. control/F10) to open the context menu and then call another step to select a context menu item.

I need similar test steps to check for enablement and existence of an item in an already opened context menu.

Thanks
Victor.
Re: Is there a way to select a context menu item of an already opened context menu? [message #732338 is a reply to message #732288] Tue, 04 October 2011 14:36 Go to previous messageGo to next message
Oliver Goetz is currently offline Oliver GoetzFriend
Messages: 219
Registered: May 2011
Senior Member
Hello Victor,

you can use the ub_app_PressAnyKey to open the context menu. For further information on this check http://help.eclipse.org/indigo/topic/org.eclipse.jubula.client.ua.help/html/reference/node13.html The User/Reference manual can be found here: http://help.eclipse.org/indigo/nav/34
Regards
Oliver
Re: Is there a way to select a context menu item of an already opened context menu? [message #732343 is a reply to message #732338] Tue, 04 October 2011 14:43 Go to previous messageGo to next message
Victor Martin is currently offline Victor MartinFriend
Messages: 29
Registered: July 2009
Junior Member
The problem is not with opening the context menu. The problem is what to use to select or check a menu item once the context menu is opened.
Re: Is there a way to select a context menu item of an already opened context menu? [message #733599 is a reply to message #732343] Wed, 05 October 2011 07:57 Go to previous messageGo to next message
Oliver Goetz is currently offline Oliver GoetzFriend
Messages: 219
Registered: May 2011
Senior Member
Hi,

some toolkits allow to map elements from context menus (e.g. as button components). Another way to select an element from an already opened context menu could be to use the arrow keys or mnemonics.
Regards
Oliver
Re: Is there a way to select a context menu item of an already opened context menu? [message #733885 is a reply to message #733599] Wed, 05 October 2011 21:08 Go to previous messageGo to next message
Victor Martin is currently offline Victor MartinFriend
Messages: 29
Registered: July 2009
Junior Member
I'm using the rcp/swt toolkit and yes I'm using mnemonics to select menu items but I still have the problem of not being able to check for existence or enablement. I guess the question then is: Why aren't context menus allowed to be mapped?

Thanks
Victor.
Re: Is there a way to select a context menu item of an already opened context menu? [message #734888 is a reply to message #733885] Mon, 10 October 2011 09:57 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi,

Our textpath actions for context-menus, menus, trees, tables are all content-based (imagine the problems you would have otherwise with dynamically-filled menus, or menus that are changed during the software development cycle). In Swing apps, the menu entries can often be mapped as buttons, but this is "chance" and we don't generally recommend it. I'm not even sure if menu items on SWT/RCP could be mapped as buttons, but I am fairly sure that we wouldn't want to do it Wink

If you need a specific solution for your case, then the best bet would be to write something that does what you need as an extension.

Best regards,
Alex

Re: Is there a way to select a context menu item of an already opened context menu? [message #734953 is a reply to message #734888] Mon, 10 October 2011 14:16 Go to previous messageGo to next message
Victor Martin is currently offline Victor MartinFriend
Messages: 29
Registered: July 2009
Junior Member
I'm not sure I understand completely. Jubula already has test steps that click and then select a context menu item. For example: "Select Context Menu Entry by Textpath". These menus can be dynamically-filled menus. Why would it not be possible to separate the "click" from the "context menu item selection"?. Also, I'm not asking to be able to map the menu items, just the context menu, these are two separate object classes...

Maybe there is a different way. My problem is that I'm trying to create a reusable test case for an editor. I need to be able to automate setting a breakpoint in an editor at a particular line number. I could use the "Select Context Menu Entry by Textpath (Specify Position)" using the editor's tab pane but that means I would need to map a y-coordinate to a line number which is very complicated and unreliable.

What I want to do is:
Application->Key Combination to activate editor
Application->Key Combination to go to the line number where I need to set the breakpoint,
Application->Key Combination to open the context menu with the "Toggle Breakpoint" menu item,
and then do a "Select Context Menu Entry by Textpath" (already opened menu, no mouse button click required)

Thanks
Victor.
Re: Is there a way to select a context menu item of an already opened context menu? [message #735161 is a reply to message #734953] Tue, 11 October 2011 06:42 Go to previous message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi,

Without knowing how our implementation classes work for context menus, and how we recognize them during the test, I can't make much of a comment on selecting from an already open context menu. You could file an enhancement request in the Jubula Bugzilla for the feature or submit a patch with the feature if you want to.

Best regards,
Alex
Previous Topic:Defining multiple key combinations for an action on the same test
Next Topic:How to let Jubula "forget" a database
Goto Forum:
  


Current Time: Thu Mar 28 21:03:48 GMT 2024

Powered by FUDForum. Page generated in 0.05795 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top