title: Getting the URL of the current page using Selenium WebDriver
body: <p>I'm attempting to get the URL of the currently open page.  I am using Selenium WebDriver and Java.</p>
  
  <p>I am accessing the current URL via:</p>
  
  <pre><code>WebDriver driver = new WebDriver();
  String url = driver.getCurrentUrl();
  </code></pre>
  
  <p>however, the URL does not appear to actually reflect where I currently am.</p>
  
  <p>My current test case involves going to the NYT website and then clicking on the "Technology" link.  However, <code>url</code> appears to always be <code>http://www.nytimes.com/</code>, regardless of the URL that is displayed in the address bar.</p>
  
  <p>How do I actually access the value of the URL that's in the address bar so I can tell what page I'm actually on?</p>