public void US4ScenarioWrongInfo() { var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(10)); string currUrl = driver.Url; if (currUrl != "http://automationpractice.com/index.php") { driver.Navigate().GoToUrl("http://automationpractice.com/index.php"); wait.Until(SeleniumExtras.WaitHelpers.ExpectedConditions.ElementIsVisible(By.XPath("//a[@class='login']"))); } var index = new IndexPage(driver); var signIn = new SignInPage(driver); var register = new RegistrationFormPage(driver); //from home click signin index.NavigateToSignIn(); //from signin register with email signIn.ClickRegister(); //go to form page and send keys for info register.EnterIncorrect(); //send wrong info to assert error message Assert.IsFalse(register.WasErrorAlertDisplayed()); }