Add waitFor around window switching as it seems that page loading in a separate window is not a blocking operation in some drivers