public void AddCookieTest() { HomePage.WebDriver.Manage().Cookies.DeleteAllCookies(); new Check().IsTrue(HomePage.WebDriver.Manage().Cookies.AllCookies.Count == 0); Cookie cookie = new Cookie("key", "value"); ContactFormPage.AddCookie(cookie); new Check().AreEquals(HomePage.WebDriver.Manage().Cookies.GetCookieNamed(cookie.Name).Value, cookie.Value); }