error in executing my own swingunit

View: New views
3 Messages — Rating Filter:   Alert me  

error in executing my own swingunit

by jmacion :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,
    I am new in swing unit. i have successfully executed your demo. But, when i work on my own swing unit, i get this error.
Caused by: swingunit.framework.Finder$SearchException: More than two windows are matching for =swingunit.framework.WindowClassParameter[finderMethod=ROOT_CONTAINER, windowClass=javax.swing.JFrame]

Here, i have two scenarios.
But when i have only one scenario, i can successfully execute the application.

Can you please help me on this one?

Re: error in executing my own swingunit

by Nobuhiko Yasunaka-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello jmacion,

The message says there are two or more root windows.
Maybe, your test program does not close the target
test window before running second scenario.

If you use ROOT_CONTAINER as a finderMethod,
close existing windows before run the second scenario
or simply do not open the window in the second scenario.


jmacion wrote:

> Hello,
>     I am new in swing unit. i have successfully executed your demo. But,
> when i work on my own swing unit, i get this error.
> Caused by: swingunit.framework.Finder$SearchException: More than two windows
> are matching for
> =swingunit.framework.WindowClassParameter[finderMethod=ROOT_CONTAINER,
> windowClass=javax.swing.JFrame]
>
> Here, i have two scenarios.
> But when i have only one scenario, i can successfully execute the
> application.
>
> Can you please help me on this one?

--
----------------------------------------------------
Nobuhiko YASUNAKA
update it, Inc.
Web    http://www.updateit.co.jp/index_en.shtml
Blog   http://blog.updateit.co.jp/
E-Mail yasunaka@...


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...


Re: error in executing my own swingunit

by jmacion :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thank you for the reply.
I've just found out why my code doesn't work.
In my tear down fucntion, i did not set to false my main frame's setVisible() method.
But well, thanks anyways.
Your information has helped me.

Hello jmacion,

The message says there are two or more root windows.
Maybe, your test program does not close the target
test window before running second scenario.

If you use ROOT_CONTAINER as a finderMethod,
close existing windows before run the second scenario
or simply do not open the window in the second scenario.

LightInTheBox - Buy quality products at wholesale price