I am looking for an actual functional web browser control for .NET, maybe a C++ library [closed]
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this questionI 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.sou开发者_JAVA百科rceforge.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.
Have you seen Watin?
If you understand basic (beginner level) of java, you can give a try to Selenium.
Dunno if it offers all the functions you need but it's a powerful tool used to test webapps. It makes the browser you want run (firefox, ie, chrome...) and you can make the browser click on any item, execute javascript, parse dom with xpath, use proxy, you can set up a custom firefox profile to run with selenium... many powerful options.
It seems to be almost the same as Watin but for Java. Don't know Watin but i tried Selenium and was really surprised how powerful it was...
精彩评论