.net equivalent of htmlunit?

懵懂的女人 提交于 2019-12-17 22:34:11

问题


Does anybody know if there is a .net equivalent of htmlunit or similar library?

I've heard that people have used IKVM to convert the htmlunit library. But I have also heard that the converted code is slow.

Requirements:

  • Headless browser
  • Support javascript
  • Handle cookies
  • .Net

回答1:


You can try out the just-released NHtmlUnit (available on NuGet), which is a .NET-wrapper for HtmlUnit. It's not .NET as in "written in a .NET language and compiled to MSIL", but it's converted to .NET with IKVM and we've written a layer of "purified" C# code on top of it so everything looks and behaves like .NET.




回答2:


You can use Htmlunit from .net with ikvm. I followed the instructions at http://blog.stevensanderson.com/2010/03/30/using-htmlunit-on-net-for-headless-browser-automation/ and it worked for me.

edit: it is slow though. recently I've been using Selenium Server with the .net client




回答3:


Nothing yet that fulfils all of your requirements.

XBrowser is a headless browser that handles cookies, but does not support javascript. It is however in active development so this may change.



来源:https://stackoverflow.com/questions/2463735/net-equivalent-of-htmlunit

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!