It failed if the default selector was css, and failed with selenium with xpath. Calling find('.') or find('/') in selenium returns a element that causes errors. It now calls find(:xpath, '/html') which seems to work everywhere.