我正在使用 FireFoxDriver、C#、NUnit 和 Selenium。
我的测试方法首先转到一个页面并执行一些操作,然后用户将被重定向到另一个页面。
如何验证页面重定向是否发生?
this.FireFoxWebDriver.Navigate().GoToUrl(url);
// performing some actions
// todo: how to verify the page url now?
谢谢,
请您参考如下方法:
啊,这么简单!
Assert.AreEqual(this.FireFoxWebDriver.Url, expectedRedirectUrl);
