When using FireFoxDriver in Selenium, How to Know The Page Url?
-
03-12-2019 - |
Domanda
I'm using FireFoxDriver, C#, NUnit and Selenium.
My test method starts by going to a page and performing some actions then the user will be redirected to another page.
How to verify whether the page redirection has occured?
this.FireFoxWebDriver.Navigate().GoToUrl(url);
// performing some actions
// todo: how to verify the page url now?
Thanks,
Soluzione
ah, so simple!
Assert.AreEqual(this.FireFoxWebDriver.Url, expectedRedirectUrl);
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow