Question about shelldisposed condition

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

Question about shelldisposed condition

Postby scshah » Tue Jan 29, 2008 1:41 pm

Hi All,

I am trying following code
try
{
ui.wait(new ShellShowingCondition("aa"));
ui.wait(new ShellDisposedCondition("aa"),waitTime);
}
catch(Exception ex)
{
throw ex;
}
everything works fine, even whole process finishes, but in result it shows me com.windowtester.runtime.WaitTimedOutException: Timed out waiting for condition:
toString=shell titled: aa to be disposed
class=com.windowtester.runtime.swt.condition.shell.ShellDisposedCondition

This window is also there on screen..what should I do to avoid this?

Thanks
scshah
 
Posts: 19
Joined: Fri Jan 11, 2008 3:52 pm

Re: Question about shelldisposed condition

Postby Phil Quitslund » Wed Jan 30, 2008 1:33 pm

What exactly are you trying to do?

That's exactly the failure I would expect if the shell has not been disposed. That is, if the shell titled "aa" is on the screen when the timeout here

Code: Select all
ui.wait(new ShellDisposedCondition("aa"),waitTime);


is exceded, I would expect a wait timeout to be caught and rethrown here:

Code: Select all
catch(Exception ex)
{
throw ex;
}


How is the shell supposed to be disposed? Does it dispose itself after a certain amount of time? If so, perhaps you need to up the timeout?
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am

Re: Question about shelldisposed condition

Postby scshah » Mon Mar 24, 2008 10:04 pm

Hi Phil,

I already verified by increasing the timeout. but the strange thing is that, this is wokring fine with 1 test, but rest others tests it shows the problem that I mentioned above. What other thing should I check?
scshah
 
Posts: 19
Joined: Fri Jan 11, 2008 3:52 pm

Re: Question about shelldisposed condition

Postby Phil Quitslund » Tue Mar 25, 2008 9:23 am

So the condition does not expire for the first but it does for the rest? Hmmm.... Are you sure the action that causes the shell to close is getting properly triggered? For instance, are you clicking a button that is not enabled?

Still mulling this over...
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am

Re: Question about shelldisposed condition

Postby scshah » Wed Mar 26, 2008 8:43 am

Yes, the action is getting properly triggered. I verified it.Also the testcase where I am getting error like below:

com.windowtester.runtime.WaitTimedOutException: Timed out waiting for condition:
toString=shell titled: Inventory: (\w*) to show
class=com.windowtester.swt.condition.shell.ShellShowingCondition

So now its shellshowing condition. I verified all other scripts, so this kind of problem is now in 1 or 2 testcases.Can you please guide me or suggest what is wrong? :(
scshah
 
Posts: 19
Joined: Fri Jan 11, 2008 3:52 pm

Re: Question about shelldisposed condition

Postby Phil Quitslund » Wed Mar 26, 2008 9:36 am

Is "Inventory: (\w*)" the actual title of the shell?
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am

Re: Question about shelldisposed condition

Postby scshah » Thu Mar 27, 2008 9:33 am

no I used regular expression..i used same thing at other places.
scshah
 
Posts: 19
Joined: Fri Jan 11, 2008 3:52 pm

Re: Question about shelldisposed condition

Postby Phil Quitslund » Thu Mar 27, 2008 7:13 pm

Out of curiosity, can you try it with the exact shell title String? Is there a chance that the regular expression is failing to match the title? What is the exact tile you're trying to match?
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am

Re: Question about shelldisposed condition

Postby scshah » Fri Mar 28, 2008 3:00 pm

Hi Phil,

Ohh..It's my fault.After your suggestion I verified my pattern. It was wrong.Now it is working. :D

Thanks a lot.
scshah
 
Posts: 19
Joined: Fri Jan 11, 2008 3:52 pm

Re: Question about shelldisposed condition

Postby Phil Quitslund » Fri Mar 28, 2008 8:06 pm

Good deal. Glad you're back on track!
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am


Return to Window Tester

Who is online

Users browsing this forum: No registered users and 1 guest