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

ShouldNotShowCookieAddedToDifferentDomain() private méthode

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