Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Jubula » possible to define / use conditions?
possible to define / use conditions? [message #1464420] Fri, 07 November 2014 14:35 Go to next message
Michael Remme is currently offline Michael RemmeFriend
Messages: 9
Registered: October 2012
Junior Member
Is it possible to define conditions inside a testcase?

For example:
i want to test the login feature inside a webpage, but only if the user is not logged in already.
The logic in rough could be desribed as:
If there is element "login here" existing, perform the steps to login; otherwise let it.

Currently i did not find a way to solve that.
Re: possible to define / use conditions? [message #1464422 is a reply to message #1464420] Fri, 07 November 2014 14:40 Go to previous messageGo to next message
Alexandra Schladebeck is currently offline Alexandra SchladebeckFriend
Messages: 1613
Registered: July 2009
Senior Member
Hi Michael,

You can do this using event handlers. For examples like this, you can use the "retry" option to achieve, e.g.

- check whether login is not there
--- if it is there (check failed), perform it (as part of the event handler), then retry the failed check.

There are examples of modules that do similar things on the portal:
http://testing.bredex.de/deal-with-occasional-dialog.html
http://testing.bredex.de/wait-for-status-text-to-change.html

Hope that helps!
Alex
Re: possible to define / use conditions? [message #1464710 is a reply to message #1464422] Fri, 07 November 2014 20:27 Go to previous messageGo to next message
Plinio Froener is currently offline Plinio FroenerFriend
Messages: 13
Registered: May 2014
Junior Member
Good question,

Hi Alex,

but if the Retry check will fail again, and again.... because the Login will not be there... i think that Michael need just one "IF".

The test case always will finished with error check.

Have some work around for this?

thanks,


Plínio
Re: possible to define / use conditions? [message #1481216 is a reply to message #1464710] Thu, 20 November 2014 21:26 Go to previous message
David Hickernell is currently offline David HickernellFriend
Messages: 85
Registered: October 2012
Member
Plinio Froener wrote on Fri, 07 November 2014 15:27
but if the Retry check will fail again, and again.... because the Login will not be there... i think that Michael need just one "IF".

The trick is, the check needs to be that it passes if the login is NOT there. If the login IS there, then the check fails, and the event handler executes. The event handler deals with the login so that it is no longer there when the check is retried, and so the check passes on the retry.
Previous Topic:Easiest way to debug an AUTAgent?
Next Topic:Sharing a testcase among different AUTs under the same project
Goto Forum:
  


Current Time: Tue Sep 24 13:40:56 GMT 2024

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

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

Back to the top