title: Selenium driver's page source different than browser
body: <p>i unfortunately am not able to post code to reproduce this problem, since it involves signing into a site that is not a public site. but my question is more general than code problems. essentially, <code>driver.page_source</code> does not match what shows up in the browser it is driving. this is not an issue with elements not loading fully because i am testing this while executing code line by line in a python terminal. i am looking at the page source in the browser after right clicking and going to "view page source", and but if i print <code>driver.page_source</code> or attempt to <code>find_element_by_[...]</code>, it shows slightly different code with entire elements missing. here is the html in question:</p>
  
  <pre><code>&lt;nav role="navigation" class="utility-nav__wrapper--right"&gt;
  &lt;input id="hdn_partyId" value="1965629" type="hidden"&gt;
  &lt;input id="hdn_firstName" value="CHARLES" type="hidden"&gt;
  &lt;input id="hdn_sessionId" value="uHxQhlARvzA7N16uh+KJAdNFIcY6D8f9ornqoPQ" type="hidden"&gt;
  &lt;input id="hdn_cmsAlertRequest" type="hidden" value="Biennial Plus"&gt;
  &lt;ul class="h-list h-list--middle"&gt;
      [...]
  &lt;/ul&gt;
  </code></pre>
  
  <p></p>
  
  <p>i need all 4 of the input elements, however, <code>hdn_partyId</code> and <code>hdn_sessionId</code> elements do not appear in selenium's <code>.page_source</code> and if i try to get them with <code>.find_element_by_[...]</code> i get a <code>NoSuchElementException</code></p>
  
  <p>i even ran a check on finding all <code>input</code> elements and listing them, and these 2 do not show up.</p>
  
  <p>does anyone have any idea why selenium would not provide the same content as directly looking at the browser it is driving?</p>
  
  <p>EDIT: to clarify... i am driving Chrome with Chromedriver through Selenium. this is not an issue with the page not fully loading. as i mentioned, i am running this manually line by line through a python terminal and not executing a script. so the browser pops up, loads the page, logs in, and then i manually check the browser's page source and see the element, then i <code>print driver.page_source</code> and it's not there, and if i run <code>session_id = driver.find_element_by_id('hdn_sessionId')</code> i get a <code>NoSuchElementException</code>. there are also no frames at all in the page, nor any additional windows.</p>