OpenQA.Selenium.CookieImplementationTest.ShouldNotShowCookieAddedToDifferentPath C# (CSharp) Méthode

ShouldNotShowCookieAddedToDifferentPath() private méthode

private ShouldNotShowCookieAddedToDifferentPath ( ) : void
Résultat void
        public void ShouldNotShowCookieAddedToDifferentPath()
        {
            driver.Url = macbethPage;
            IOptions options = driver.Manage();
            Cookie cookie = new Cookie("Lisa", "Simpson", EnvironmentManager.Instance.UrlBuilder.HostName, "/" + EnvironmentManager.Instance.UrlBuilder.Path + "IDoNotExist", null);
            options.AddCookie(cookie);
            ReadOnlyCollection<Cookie> cookies = options.GetCookies();
            Assert.IsFalse(cookies.Contains(cookie), "Invalid cookie was returned");
        }