Fix tests

This fixes a bunch of tests (not all of them yet though). Each commit fixes a separate thing, but I haven't submitted them separately as it was easier to work on a single branch when I was in the train (and it will be easier to see the difference in the test results.
Well, it would require running some JS code to read the attribute, which is likely to be slower than reading it on the object we already have (the alternative is to drop the usage of DomCrawler entirely)