I have been attempting to capture a webpage for automation purposes however I have been having issues where DrawToBitmap() returns a white picture. It seems to me that it returns white when the DOM has been changed or the browser navigates.
For example I am filling out the login form programatically and then submitting the form, and it seems that once I give the AJAX request enough time to complete and the browser gets redirected it will ALWAYS produce a white image.
I fixed that problem by disposing of and recreating my WebBrowser instance and then navigating directly to the post-login page. This works fine if I take the screen shot when the ReadyState is 'Complete'. However if I give it enough time to load the data for the graphs in and other data it needs then I get a white image.
I have also tested and can confirm that it is not the delay in the program that is causing the white image.
Any help would be greatly appreciated!
Thanks!