public static RestaurantsPage goToRestaurantPage() { var wait = new WebDriverWait(driver, new TimeSpan(0, 0, 10)); var loading = wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementIsVisible((By.LinkText("Restaurants")))); Restaurants = driver.FindElement(By.LinkText("Restaurants")); Thread.Sleep(2000); Restaurants.Click(); return(new RestaurantsPage(driver)); }