You could use the TagTester for that.

Example:

        // <span wicket:id="myLabel" class="one-class, another-class">hello
world</span>
        TagTester tester = wicketTester.getTagByWicketId("myLabel");

        assertTrue(tester.getAttributeContains("class", "one-class"));
        assertTrue(tester.getAttributeContains("class", "another-class"));
        assertFalse(tester.getAttributeContains("class", "not-this-class"));


Best regards / Met vriendelijke groet,

Kees van Dieren
Squins IT Solutions BV
Oranjestraat 30
2983 HS Ridderkerk
The Netherlands
Mobile: +31 (0)6 30413841
www.squins.com
Chamber of commerce Rotterdam: 24435103


2013/11/21 Martin Makundi <martin.maku...@koodaripalvelut.com>

> assertContains
>
>
> 2013/11/21 Nick Pratt <nbpr...@gmail.com>
>
> > Is it possible to to make assertions on the rendered HTML of a Wicket
> page?
> >
> > Im trying to make assertions on element attributes (class contents
> > specifically).  Is this possible with WicketTester?
> >
> > N
> >
>

Reply via email to