title: C# WebDriver: driver not updating after Page Refresh
body: <p>I have a scenario where I need to load a page, and if something isn't present on it, reload the page until it is.  The page also has ajax content (an IFrame) which contains the content I'm looking for.  </p>
  
  <p>The first page load, I am able to find the IFrame and detect the content I am looking for is not present.  </p>
  
  <pre><code>var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(30));
  wait.Until(drv =&gt; drv.FindElement(By.Name(frameName)));
  driver.SwitchTo().Frame(frameName);
  var content = driver.FindElement(By.Id("myContent"));
  </code></pre>
  
  <p>I then call:</p>
  
  <pre><code>driver.Navigate().Refresh(); 
  driver.SwitchTo().DefaultContent();
  </code></pre>
  
  <p>to reload the page and then call the following again:</p>
  
  <pre><code>var wait = new WebDriverWait(driver, TimeSpan.FromSeconds(30));
  return wait.Until(drv =&gt; drv.FindElement(By.Name(frameName)));
  </code></pre>
  
  <p>However the driver's PageSource contains the pre-ajax content of the page despite the fact that I can see the page has had content added to it.  The FindElement call continues to throw until the 30 second timeout occurs.</p>
  
  <p>Can anyone suggest what's wrong here?</p>