public static void SelectAreaTypeAndWaitForPageToLoad(IWebDriver driver, string areaTypeLinkId) { var waitFor = new WaitFor(driver); var byAreaTypeLink = By.Id(areaTypeLinkId); waitFor.ExpectedElementToBeVisible(byAreaTypeLink); driver.FindElement(byAreaTypeLink).Click(); // Added because this method was finishing before the page had fully switched area type WaitFor.ThreadWait(0.1); waitFor.PageToFinishLoading(); waitFor.GoogleMapToLoad(); }