0

I tried WebBrowser but any solution related to WebBrowser I find uses the exact same codes, WebBrowser.DrawToBitmap

Problem with that is, it gives out inaccurate results depending on URL, to what page actually would look like, sometimes even blank pages.

So I am looking for any alternate solution to WebBrowser if there is any.

It needs to run in background, as in not open any browser on screen, render it in background with all scripts and get an image.

1 Answers1

0

If I understand what you're trying to do, you might be interested in a framework called PhantomJS, which is a WebKit "browser" engine which runs the pages without visually rendering them. It can be used to capture screens.

Now this technique requires JavaScript, but there is something called Selenium WebDriver to help you wrapping that. Users here at SO posted a simple example and this comment looks useful as it contains the list of required Packages.

thmshd
  • 5,729
  • 3
  • 39
  • 67
  • 1
    I followed the exact instructions and managed to get 100% accurate screenshots, thank you so much! –  Nov 03 '17 at 07:22