Parse outputted HTML in test to avoid reliance on attribute order