Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » Event handler does not propagate component name: Workaround wanted
Event handler does not propagate component name: Workaround wanted [message #1404979] Wed, 06 August 2014 09:39 Go to next message
Florian Lenzner is currently offline Florian LenznerFriend
Messages: 4
Registered: July 2014
Junior Member
Hi there,

as stated in issue 336199, component names cannot be propagated from an event handler.

Is there a way to work around this limitation in the following case:

TC "Provide dialog"


  • <check existence> [component name A]
  • Event handler: <open dialog>


TC "Open dialog"


  • <click left> [component name B]
  • <wait for component> [component name A]


I would like to use this as a generic test case, and propagate component names A and B from both test cases. Unfortunately, when reusing "Provide dialog", I will not see component name B propagated to the parent.

The only solution I come across is to create test cases "Open dialog XY" for all dialogs I need to open, with "hard-coded" component names A, B.

Is there a more convenient (generic) way to do this? Appreciate your help!

Florian



Re: Event handler does not propagate component name: Workaround wanted [message #1405099 is a reply to message #1404979] Wed, 06 August 2014 15:30 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1334
Registered: July 2009
Senior Member
If there is a component name that you can use in the main Test Case as well as in the Event Handler, then you can propagate this name from the Test Case and the Event Handler and it will work. (So you could check for the non-existence of a component you want to click in the Event Handler for example).

If the component name you need in the Event Handler can't be used in the Test Case, then you'll have to make separate modules.

Hope that helps,
Alex
Re: Event handler does not propagate component name: Workaround wanted [message #1405365 is a reply to message #1405099] Thu, 07 August 2014 07:35 Go to previous messageGo to next message
Florian Lenzner is currently offline Florian LenznerFriend
Messages: 4
Registered: July 2014
Junior Member
Yes, in the above case, component name A was propagated, but not component name B. (I need to click on B to bring up A, basically).

I found one possible workaround, which is a bit ugly, though:

TC "Provide dialog"


  • Check for non-existence [component name A]
  • <open dialog>
  • Event handler: <NOP>


The NOP test case does nothing. The event handler has reentry type of RETURN. In case component A is there, the check fails, and the event handler returns from the test case. This works, but makes the test fail in case the dialog (component A) is already there - not very nice. Actually, this is not what you want in your tests, so eventually, I'm using separate modules.

Thanks, anyway!
Florian


Re: Event handler does not propagate component name: Workaround wanted [message #1406018 is a reply to message #1405365] Fri, 08 August 2014 19:43 Go to previous message
David Hickernell is currently offline David HickernellFriend
Messages: 83
Registered: October 2012
Member
Couldn't you add a "Check existence" for Component Name B in the "Provide Dialog" test case? That should enable you to propagate Component Name B, and it sounds like that component should be present anyway.
Previous Topic:Periodic Error: "Cannot delete test result"
Next Topic:Remote AUT - how to?
Goto Forum:
  


Current Time: Sat May 23 16:31:03 GMT 2015

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

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