Make and use a method for asserting html elements

This should make creating simple tests for special
pages a bit nicer!
Change-Id: I297a4431dd9ce42bc80ab12d17f77a51f65cad66