.net 相当于 htmlunit?
有人知道是否有 .net 等价的 htmlunit 或类似的库吗?
我听说人们已经使用 IKVM 来转换 htmlunit 库。但我也听说转换后的代码很慢。
要求:
- 无头浏览器
- 支持 javascript
- 处理 cookies
- .Net
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以尝试刚刚发布的 NHtmlUnit (可在 NuGet),它是 HtmlUnit 的 .NET 包装器。它不是“用 .NET 语言编写并编译为 MSIL”中的 .NET,而是使用 IKVM 转换为 .NET,我们在其之上编写了一层“纯化的”C# 代码,因此一切看起来和行为都像 .NET。
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.
您可以将 .net 中的 Htmlunit 与 ikvm 结合使用。我按照 的说明进行操作http://blog.stevensanderson.com/2010/03/30/using-htmlunit-on-net-for-headless-browser-automation/ 它对我有用。
编辑:虽然速度很慢。最近我一直在使用 Selenium Server 和 .net 客户端
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
目前还没有任何东西可以满足您的所有要求。
XBrowser 是一个处理 cookie 的无头浏览器,但不支持 javascript。然而,它正在积极开发中,因此这可能会改变。
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.