Fix tests to use selector instead of nokogiri directly