You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Keith Bennett <kb...@fedcsc.com> on 2009/07/10 00:14:03 UTC

Test Methods for Querying Component Tree

Hello, all.  I am relatively new to Wicket.  Sometimes when I write
tests I get the Wicket ID wrong, and try to figure out what the right
one is.

To address this, I wrote some code that gets the component tree, and
either returns a List, or a string with the components' id's and
classes. It can be found at http://gist.github.com/144041.

Is this useful to anyone?  Is there a better way for me to view the
component tree at runtime/test time?

Thanks,
Keith


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


SV: Test Methods for Querying Component Tree

Posted by Wilhelmsen Tor Iver <To...@arrive.no>.
> To address this, I wrote some code that gets the component tree, and
> either returns a List, or a string with the components' id's and
> classes. It can be found at http://gist.github.com/144041.
> 
> Is this useful to anyone?  Is there a better way for me to view the
> component tree at runtime/test time?

WicketTester has #debugComponentTrees() which seems to do most of what you want, or you can use WicketTesterHelper#getComponentData(). Do they cover the same needs as your code?

- Tor Iver

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org