Add wait for page title in an attempt to fix failing test

This passes locally, and I hope it will fix the problem on CI.