public void LoginwithoutUsername() { utilities.ConsoleMessageStart(); utilities.extenttest = utilities.extent.StartTest("Login without username"); utilities.extenttest.AssignCategory("Login and Logout Tests"); login.NavigateTo(); driver.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(2000); login.Loginwithoutusername(); IWebElement fielderror = driver.FindElement(By.ClassName("field-validation-error")); Assert.IsTrue(fielderror.Text.Equals("Please enter username")); utilities.extenttest.Log(LogStatus.Pass, "Assert pass "); }