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

烈酒焚心 提交于 2019-12-11 10:22:57

问题


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?


回答1:


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



来源:https://stackoverflow.com/questions/6413022/how-do-i-query-the-text-of-an-element-component-using-wickettester

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!