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