Modify the tooltip Selenium test to be more robust to timing variations