Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Jubula » How to wait for expanding a tree?
How to wait for expanding a tree? [message #1070640] Thu, 18 July 2013 07:19 Go to next message
Philipp Wueller is currently offline Philipp Wueller
Messages: 12
Registered: July 2013
Junior Member
Hello,

I expand my tree of a RCP application with the jubula module "ub_tre_expandNode_byIndexpath". My application has to load the trees nodes from a database so it takes a few seconds (2-5s) to expand the nodes of a tree. If i want to go to the next step in my test case, which needs the expanded node, the error occurs: "Node not found" because it is not loaded yet. I am using a work around by using the jubula module "ub_app_wait". By waiting 8000 milliseconds, my application has enough time to load the node of the tree.

Is there a possibilty in jubula to go on with the test case right now if the node is loaded similar to the jubula module "up_app_waitForWindow"?

I hope you can help me Smile

Kind regards,

Philipp Wueller
Re: How to wait for expanding a tree? [message #1070669 is a reply to message #1070640] Thu, 18 July 2013 08:34 Go to previous messageGo to next message
Sylvain EVEILLARD is currently offline Sylvain EVEILLARD
Messages: 511
Registered: July 2009
Senior Member
You can simulate a "waitForNode" by using a retry event handler with a wait in it.
Re: How to wait for expanding a tree? [message #1070724 is a reply to message #1070669] Thu, 18 July 2013 10:39 Go to previous messageGo to next message
Philipp Wueller is currently offline Philipp Wueller
Messages: 12
Registered: July 2013
Junior Member
Thats sounds good, but I think it is not possible to implement loops with jubula? Which modules should I use to implement the retry event handler?
Re: How to wait for expanding a tree? [message #1070874 is a reply to message #1070724] Thu, 18 July 2013 17:21 Go to previous messageGo to next message
David Hickernell is currently offline David Hickernell
Messages: 30
Registered: October 2012
Member
You can use ub_tre_checkExistenceOfNode_byIndexpath, and to the test case in which you're calling it, add ub_app_wait as an event handler with event type = "Check Failed" and reentry type = "RETRY". For example, if you wanted to check for the node once each second for 8 seconds, you could specify 8 as the number of retries, and 1000 ms as the duration of the ub_app_wait.
Re: How to wait for expanding a tree? [message #1071022 is a reply to message #1070874] Fri, 19 July 2013 03:15 Go to previous message
Philipp Wueller is currently offline Philipp Wueller
Messages: 12
Registered: July 2013
Junior Member
It is working pretty well Smile.

Thank you very much for your help!
Previous Topic:How to properly integrate Jubula with Jenkins
Next Topic:My Jubula Toolkit plug-in for custom GUI-Components doesn't work
Goto Forum:
  


Current Time: Fri Apr 18 10:11:51 EDT 2014

Powered by FUDForum. Page generated in 0.01638 seconds