javatestingwicketwicket-tester

How do I query the text of an element (Component) using WicketTester?


Rather than specifying the id-path for components to click in WicketTester I'd like to find the link with a specific text.

I can use MarkupContainer.visitChildren to run through the tree, but can I get the actual rendered component text for each leaf - something like .innerHTML?


Solution

  • Yes, see TagTester. It is part of WicketTester family.