I’m having a hard time testing our Wicket application using Selenium because of the random markup ids.
For individual elements, I can use abc.setOutputMarkupId(true).setMarkupId("myId")
to set their markup id explicitly.
But what if the element is added dynamically using a repeater (like ListView)? Is there a way to specify how the markup id sequence should look like?
Well, can’t you do the same thing with ListView? If you make your own
ListViewimplementation, and then in thepopulateItem(final ListItem<?> listItem)method, on that respectivelistItemyou do:where
iis some index you initialize in the ListView’s constructor or something?