I'm looking for methods to assert that an action caused the expected navigation. For example, after logging out, I want to assert that I'm back at the login page.
At first I did an assert on the (relative) URL, but it didn't feel right. As a second attempt, I try to access an element that should be on the page.
var loginPage = new LoginPage(this.Driver) .LogIn() .LogOut(); var assert = loginPage.LoginButton.ToString();
If it doesn't throw, then it can be said with reasonable certainty that the test is successful.
Are there any other methods that you've had success with?