title: IE8/9 - different rendering behavior when launched from vbscript?
body: <p>I have a script I've put together which a) creates an InternetExplorer object, b) navigates to a web-based interface for our in-house scheduling system, c) enters a password and selects appropriate view options.  The basics of the script are as follows:</p>
  
  <pre><code>Const READYSTATE_COMPLETE = 4
  
  Dim objExplorer
  Set objExplorer = Wscript.CreateObject("InternetExplorer.Application", "objExplorer_")
  
  objExplorer.navigate "http://url.to.scheduling.page"
  
  While objExplorer.busy Or objExplorer.ReadyState &lt;&gt; READYSTATE_COMPLETE
      Wscript.Sleep 50
  Wend 
  
  Dim objElem
  Set objElem = objExplorer.document.getElementById("password")
  objElem.value = "password"
  
  Set objElem = Nothing
  
  objExplorer.document.getElementById("commit").Click() 
  
  While objExplorer.busy Or objExplorer.ReadyState &lt;&gt; READYSTATE_COMPLETE
      Wscript.Sleep 50
  Wend 
  </code></pre>
  
  <p>I've been doing some testing w/ IE8 and IE9, and have found that when I script the IE object, the page HTML gets rendered incorrectly (in particular, some text is bolded/italicized).  If, however, I launch IE8 or IE9 manually (not via script), the page renders properly.  See below for screenshots:</p>
  
  <p>IE RENDERING - MANUAL LAUNCH
  <img src="https://i.stack.imgur.com/J12Sn.png" alt="enter image description here"></p>
  
  <p>SCRIPTED IE RENDERING (text bolded and italicized)
  <img src="https://i.stack.imgur.com/h5GEV.png" alt="enter image description here"></p>
  
  <p>I initially suspected that this has something to do with the IE document/browser mode getting a different default value in a scripted IE object, but the HTML being rendered has a <code>&lt;!-- DOCTYPE html --&gt;</code> declaration and (at least according to IE dev. tools), both versions are being displayed in standards mode.</p>
  
  <p>Does anyone have any experience with a scripted, post-IE7 IE object rendering pages differently than a manually-launched counterpart?  Would scripted and manually-launched objects report themselves in any different way (perhaps to a js function that's browser-sniffing and generating CSS on the fly?)  </p>
  
  <p>Any ideas appreciated.</p>