title: Selenium: Browser display is different then HTML code
body: <p>I want to log in to this <a href="http://www.anb.org/login.html?url=/articles/home.html%27%29&amp;ip=147.229.179.0&amp;nocookie=0" rel="nofollow">page</a> with Selenium using Python. But the page displayed in the browser is different from page described in the HTML.Firefox or Chrome webdriver gets the same result.</p>
  
  <pre><code>chromedriver = "./chromedriver"
  os.environ["webdriver.chrome.driver"] = chromedriver
  driver = webdriver.Chrome(chromedriver)
  
  # OR
  #driver = webdriver.Firefox() 
  
  
  driver.get('http://www.anb.org/login.htmlurl=%2Farticles%2Fhome.html&amp;ip=94.112.189.79&amp;nocookie=0')
  # get screenshot of page
  driver.get_screenshot_as_file('./01.png')
  
  #get source code of page
  print driver.page_source
  </code></pre>
  
  <p>I'm not allowed post the images, but the image is exactly the same as the page displayed in the web-browser.</p>
  
  <p>HTML code from driver:</p>
  
  <pre><code>&lt;html&gt;&lt;head&gt;
  &lt;title&gt;American National Biography Online&lt;/title&gt;
  &lt;script&gt;
  document.write ("&lt;FRAMESET ROWS=\"103,*\" FRAMEBORDER=0 BORDER=0 FRAMESPACING=0&gt;\n");
  document.write ("  &lt;FRAME SRC=\"top-home.html\" MARGINWIDTH=0 MARGINHEIGHT=0 SCROLLING=NO&gt;\n");
  if (location.search) {
    var url = unescape (location.search);
    url = (new String(url)).substring(1);
    if (url.indexOf ("&amp;") == -1) {
      document.write ("  &lt;FRAME SRC=\"" + url + "\" MARGINWIDTH=0 MARGINHEIGHT=0&gt;\n");
    } else {
      document.write ("  &lt;FRAME SRC=\"main-home.html" + location.search + "\" MARGINWIDTH=0 MARGINHEIGHT=0&gt;\n");
    }
  }
  else
    document.write ("  &lt;FRAME SRC=\"main-home.html\" NAME=atop MARGINWIDTH=0 MARGINHEIGHT=0&gt;\n");
  document.write ("&lt;/FRAMESET&gt;\n");
  &lt;/script&gt;&lt;/head&gt;
  &lt;frameset rows="103,*" frameborder="0" border="0" framespacing="0"&gt;
    &lt;frame src="top-home.html" marginwidth="0" marginheight="0" scrolling="NO"&gt;
    &lt;frame src="main-home.html?url=%2Farticles%2Fbrowse.html&amp;amp;ip=94.112.189.79&amp;amp;nocookie=0" marginwidth="0" marginheight="0"&gt;
  &lt;/frameset&gt;
  
  &lt;noframes&gt;
  &lt;/noframes&gt; 
  &lt;/html&gt;
  </code></pre>
  
  <p>As you can see, the HTML and the picture do not match.</p>
  
  <p>Maybe problem is with frames?</p>
  
  <p>My configuration:</p>
  
  <pre><code>osx 10.8.5
  python 2.7.5
  chrome browser 28.0.1500.71
  firefox browser 24.0
  </code></pre>
  
  <p>I installed the lastest chrome/firefox webdrivers, but I really don't know how to find version.</p>