title: How to ask Selenium2 to finish loading a page on .Click before doing any assertions?
body: <p>I would like to use the selenium2 c# webdriver to test our login mechanism. The following test passes if I run through it in debug mode and give the Click method some time. If I run it normally though the test fails with a NoSuchElementException.</p>
  
  <pre><code>    [Test]
      public void TestClickLogonLink()
      {
          _driver.Navigate().GoToUrl("http://nssidManager.local/");
          IWebElement loginElement = _driver.FindElement(By.Id("loginWidget"));
          IWebElement logonAnchor = loginElement.FindElement(By.LinkText("Log On"));
  
          logonAnchor.Click();
  
          IWebElement userNameTextBox = _driver.FindElement(By.Id("UserName"));
  
          Assert.IsNotNull(userNameTextBox);
      }
  </code></pre>
  
  <p>How do I need to tell Selenium to Wait until the logonAnchor.Click has finished loading the next page? </p>