title: Cannot retrieving scripts-executed html source with Selenium (Python)
body: <p>I'm trying to perform a web search on the website <a href="http://www.digikey.it/products/en" rel="nofollow noreferrer">http://www.digikey.it/products/en</a> with a python script using selenium as the page is dynamically generated.
  I cannot understand why I cannot retrieved the source html as seen with the Inspector Tool on Mozilla.
  I'm using the following code:</p>
  
  <pre><code>from selenium import webdriver
  
  # Browse to parts
  driver = webdriver.Firefox()
  driver.get('http://www.digikey.it/products/en')
  #driver.get('http://www.python.org')
  html = driver.page_source
  print(html)
  </code></pre>
  
  <p>and the output will be:</p>
  
  <pre><code>&lt;html&gt;&lt;head&gt;&lt;script&gt;var i10cdone =(function(){ function pingBeacon(msg){ var i10cimg = document.createElement('script'); i10cimg.src='/i10c@p1/botox/file/nv-loaded.js?status='+window.encodeURIComponent(msg); i10cimg.onload = function(){ (document.head || document.documentElement).removeChild(i10cimg) }; i10cimg.onerror = function(){ (document.head || document.documentElement).removeChild(i10cimg) }; ( document.head || document.documentElement).appendChild(i10cimg) }; pingBeacon('loaded'); if(String(document.cookie).indexOf('i10c.bdddb=c2-f0103ZLNqAeI3BH6yYOfG7TZlRtCrMwqUo')&gt;=0) { document.cookie = 'i10c.bdddb=;path=/';}; var error=''; function errorHandler(e) { if (e &amp;&amp; e.error &amp;&amp; e.error.stack ) { error=e.error.stack; } else if( e &amp;&amp; e.message ) { error = e.message; } else { error = 'unknown';}} if(window.addEventListener) { window.addEventListener('error',errorHandler, false); } else { if ( window.attachEvent ){ window.attachEvent('onerror',errorHandler); }} return function(){ if (window.removeEventListener) {window.removeEventListener('error',errorHandler); } else { if (window.detachEvent) { window.detachEvent('onerror',errorHandler); }} if(error) { pingBeacon('error-' + String(error).substring(0,500)); document.cookie='i10c.bdddb=c2-f0103ZLNqAeI3BH6yYOfG7TZlRtCrMwqUo;path=/'; }}; })();&lt;/script&gt;&lt;script&gt;typeof i10cdone === 'function' &amp;&amp; i10cdone();&lt;/script&gt;&lt;/head&gt;&lt;body&gt;&lt;script&gt;setTimeout(function(){document.cookie="i10c.eac23=1; secure";window.location.reload(true);},30);&lt;/script&gt;&lt;/body&gt;&lt;/html&gt;
  </code></pre>
  
  <p>Seems like I'm missing something important...</p>