Пример #1
0
 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));
 }
Пример #2
0
 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(""));
 }
Пример #3
0
 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));
 }