Fix some selectors for advanced search form.

We removed the IDs of some of the form elements because they were causing HTML5 validation errors. This updates the tests to use CSS selectors.