I am looking for an actual functional web browser control for .NET, maybe a C++ library
- by Joshua
I am trying to emulate a web browser in order to execute JavaScript code and then parse the DOM. The System.Windows.Forms.WebBrowser object does not give me the functionality I need. It let's me set the headers, but you cannot set the proxy or clear cookies. Well you can, but it is not ideal and messes with IE's settings.
I've been extending the WebBrowser control pinvoking native windows functions so far, but it is really one hack on top of another. I can mess with the proxy and also clear cookies and such, but this control has its issues as I mentioned.
I found something called WebKit .NET (http://webkitdotnet.sourceforge.net/), but I don't see support for setting proxies or cookie manipulation.
Can someone recommend a c++/.NET/whatever library to do this:
Basically tell me what I need to do to get an interface to similar this in .NET:
// this should probably pause the current thread for the max timeout,
// throw an exception on failure or return null w/e, VAGUELY similar to this
string WebBrowserEmu::FetchBrowserParsedHtml(Uri url,
WebProxy p,
int timeoutSeconds,
byte[] headers,
byte[] postdata);
void WebBrowserEmu::ClearCookies();
I am not responsible for my actions.