title: chromedriver not rendering html pages properly in selenium+pyvirtualdisplay in ubuntu server
body: <p>I am trying to render HTML pages in Ubuntu server (AWS-EC2) by using selenium and chromedriver with pyvirtualdisplay.
  The HTML pages do not appear as they appear in my Windows PC.
  Attaching screenshots taken from the webdriver.</p>
  
  <hr>
  
  <h2>Image as rendered in Windows PC</h2>
  
  <h2><img src="https://i.stack.imgur.com/Jxu0e.png" alt="This is the snapshot of HTML as rendered by **Windows** "></h2>
  
  <h2>Image as rendered in Ubuntu server with pyvirtualdisplay</h2>
  
  <p><img src="https://i.stack.imgur.com/cboz0.png" alt="This is the snapshot of HTML as rendered by **Ubuntu** "></p>
  
  <hr>
  
  <p>Basic configuration done while running my python code (snippets of the python code) - </p>
  
  <pre><code>display_width=1366
  display_height=768
  </code></pre>
  
  <p>Resolution is same as my Windows PC.</p>
  
  <pre><code>UserAgent="Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:25.0) Gecko/20100101 Firefox/25.0"
  </code></pre>
  
  <p>This is a standard user agent.</p>
  
  <pre><code>def create_driver(executable_path,extension_path):
      chrome_options = webdriver.ChromeOptions()
      chrome_options.add_argument('--user-agent='+UserAgent)
      driver = webdriver.Chrome(executable_path=executable_path,     chrome_options=chrome_options)
      driver.set_window_size(display_width,display_height
      driver.delete_all_cookies()
      return driver
  </code></pre>
  
  <p>This code creates driver</p>
  
  <pre><code>display = Display(visible=0, size=(display_width, display_height))
  display.start()
  driver = create_driver(executable_path,extension_path)
  input_html_file='SAMPLE'
  driver.get('file://///var/tmp/' + input_html_file)
  </code></pre>
  
  <p>I have a saved HTML file which I open in the driver - which is SAMPLE.</p>
  
  <p>It is the same HTML that I opened in Windows.
  As you see in the screenshot images, the text "91 seller reviews" wraps to the new line. Since I am working on calculating height of this block and other areas, it affects my results.</p>
  
  <p>The code works like a charm in Windows, giving correct result (height), but in Ubuntu since rendering itself is incorrect, so is the result.</p>
  
  <p>This is what I have tried so far - </p>
  
  <ol>
  <li>Changing resolution of the display. Did not work. For absolutely any display size, the screenshot looks the same.</li>
  <li>Changing font, font size etc. Did not work. Every block in HTML has different css, so it is pain in the neck.</li>
  <li>Changing browser. Did not work, either in Firefox or Chrome</li>
  </ol>
  
  <p>I am running out of ideas, it would be very helpful if somebody shared their ideas or experiences or some solution to this issue.</p>
  
  <p>I understand it could be a graphics driver issue, Windows has one but Ubuntu server doesn't.</p>
  
  <p>Please help. Thank you, in anticipation.</p>
  
  <p>Edit: Image descriptions.</p>