public void LoginwithIncorrectUsername() { utilities.ConsoleMessageStart(); utilities.extenttest = utilities.extent.StartTest("Login With Incorrect Username"); utilities.extenttest.AssignCategory("Login and Logout Tests"); driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(2000); login.NavigateTo(); login.LoginUsernameFail(); IWebElement error = driver.FindElement(By.ClassName("error-box")); Assert.IsTrue(error.Text.Equals("Invalid username or password.")); utilities.extenttest.Log(LogStatus.Pass, "Assert pass "); }