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")); }
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")); }