Replaced hard pauses in tests with dynamic pauses that check for
elements on page