Ejemplo n.º 1
0
        public void PermanentRedirect()
        {
            var driver = new HttpDriver(new WebRequester()
                                .AutomaticallyFollowRedirects(false));

            driver.Navigate().GoToUrl("http://localhost:9001/TestSite/PermanentRedirectToAnotherPage.aspx");

            Assert.That(driver.Url, Is.EqualTo("http://localhost:9001/TestSite/PermanentRedirectToAnotherPage.aspx"));
        }
Ejemplo n.º 2
0
        public void TemporaryRedirectWithAutoFollowRedirects()
        {
            var driver = new HttpDriver(new WebRequester()
                                .AutomaticallyFollowRedirects(true));

            driver.Navigate().GoToUrl("http://localhost:9001/TestSite/TemporaryRedirectToAnotherPage.aspx");

            Assert.That(driver.Title, Is.EqualTo("Another Page"));
            Assert.That(driver.Url, Is.StringContaining("/TestSite/AnotherPage.aspx"));
        }