public static void Logout() { if (GenericHelper.IsElemetPresent(By.XPath("//div[@id='header']/ul[1]/li[11]/a"))) { ClickButton(By.XPath("//div[@id='header']/ul[1]/li[11]/a")); GenericHelper.WaitForWebElementInPage(By.Id("welcome"), TimeSpan.FromSeconds(30)); } }