public void TestMethod1() { HomePage homePage = new HomePage(driver); if (homePage.Header.UserNameFieldExists()) { homePage.Header.ClickSignOut(); } ContactUsPage contactUsPage = homePage.Header .ClickContactUs() .FillContactForm("Customer service", "nope", "4321234", "Help!"); bool emailIsValid = contactUsPage.GetEmailValidation(); Assert.IsFalse(emailIsValid, "Email address should not be valid"); emailIsValid = contactUsPage.FillContactForm("Customer service", "*****@*****.**", "3211234", "this will work") .GetEmailValidation(); Assert.IsTrue(emailIsValid, "This email should show it should be valid"); }