This line looks like not really kind, nor maintainable.
There is probably some better DOM manipulations API methods from the `TemplateTestCase` class