WaitTimedOutException waiting for widget to be disposed

WindowTester allows you to easily create and run unit tests for every GUI they build. It can also be used to generate system level tests.

Moderators: gnebling, Eric Clayberg, Dan Rubel, keertip, Phil Quitslund

WaitTimedOutException waiting for widget to be disposed

Postby ajbetz » Fri Feb 11, 2011 1:53 pm

I have a chunk of code that is trying to make the ui context wait while some processing is taking place on a page of my RCP application. I am trying to reference a ProgressBar widget, that shows how much processing is left. As long as this ProgressBar is displayable on screen, then I need my test to just wait for a bit.

Here's my code:

Code: Select all
//Testing this line...
try {
     ui.wait(new WidgetDisposedCondition((ProgressBar)((IWidgetReference)ui.find(
      new SWTWidgetLocator(ProgressBar.class, new ViewLocator("com.ibm.cic.agent.ui.wizards")))).getWidget()));
}catch(Exception e) {

While debugging my test, I thought that my block of code was working, as the wait() method was taking a while to step through. However, I noticed that something went wrong, because eventually my exception handler was picked up. Here is the exception message:

com.windowtester.runtime.WaitTimedOutException: Timed out waiting for condition:
toString=ControlReference - ProgressBar {} to be disposed

What is the default "wait time" for the wait() method before it times out? I referenced the wait() API method, and it looks like there is some support for being able to specify a timeout length and polling interval parameters. Ideally, the processing on my page should not take any longer than approx. 5 hours ... if the length time is in ms, then should that block be changed to:

ui.wait(<my condition>, 18000000);

Posts: 17
Joined: Wed Jan 05, 2011 4:10 pm
Location: Beaverton, OR

Re: WaitTimedOutException waiting for widget to be disposed

Postby gnebling » Fri Feb 18, 2011 11:29 am

The default wait timeout = 60000ms.

Have you tried ui.wait(condition, timeout, interval)?
Posts: 243
Joined: Tue Aug 22, 2006 7:49 am

Return to Window Tester

Who is online

Users browsing this forum: No registered users and 1 guest