I use WebTest to test basic HTML functions, but it supports JavaScript, and I don't know if there is a better way?