public void SetCookie() { const string expected = "Cookie value"; Driver.CreateCookie("TestCookie", expected); var page = new CookieTestPage(Driver); page.Open(); Assert.That(page.TextField.Text, Is.EqualTo(expected)); }
public void DeleteCookie() { GetCookie(); // Use the GetCookieTest to create a cookie Driver.DeleteCookie("TestCookie"); var page = new CookieTestPage(Driver); page.Open(); Assert.That(page.TextField.Text, Is.EqualTo("")); }
public void GetCookie() { const string expected = "Cookie value"; var page = new CookieTestPage(Driver); page.Open(); page.TextField.Type(expected); page.Button.ClickAndWait(); var actual = Driver.GetCookie("TestCookie"); Assert.That(actual, Is.EqualTo(expected)); }