Fix for failing CI tests

Added method to wait for page to load