I am looking for an actual functional web browser control for .NET, possibly a C ++ library

I am trying to emulate a web browser to execute JavaScript code and then parse the DOM. The System.Windows.Forms.WebBrowser object does not give me the functionality I need. This allowed me to set headers, but you cannot set proxies or clear cookies. Well, you can, but it's not perfect and mess with IE settings.

I have so far expanded the WebBrowser control by creating my own window functions, but this is really one hack on top of the other. I can communicate with the proxy server, as well as clear cookies, etc., but this control has its problems, which I talked about.

I found something called WebKit.NET ( http://webkitdotnet.sourceforge.net/ ), but I do not see support for setting a proxy or manipulating cookies.

Can anyone recommend a C ++ / library. NET / whatever for this:

Basically tell me what I need to do to get an interface similar to 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.

+3
source share
2 answers

Have you seen Watin ?

+2
source

If you understand the basic (entry level) java, you can try Selenium.

Dunno, , , webapps. , (firefox, .. ...), , javascript, dom xpath, , Firefox ... .

, , Watin, Java. , Selenium , ...

+1

Source: https://habr.com/ru/post/1739832/


All Articles