程序化 Web 浏览器 Java 库

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1299560/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-29 16:01:28  来源:igfitidea点击:

Programmatic web browser Java library

javabrowser

提问by Strudel

Does anyone know of any Java library for programmatic web browsing?

有谁知道任何用于程序化网页浏览的 Java 库?

Prowserdoesn't cut it because there's no "push the button" method and Watijis limited to Internet Explorer Windows only.

Prowser不会削减它,因为没有“按下按钮”的方法,而且Watij仅限于 Internet Explorer Windows。

回答by karim79

htmlunit?

htmlunit?

http://htmlunit.sourceforge.net/

http://htmlunit.sourceforge.net/

The above link says:

上面的链接说:

... HtmlUnit is not a generic unit testing framework. It is specifically a way to simulate a browser for testing purposes...

... HtmlUnit 不是通用的单元测试框架。它是一种专门模拟浏览器以进行测试的方法......

回答by Damo

You may be able to find some of what you want in Seleniumand especially when using Selenium Server like in this IBM article

您可能能够在Selenium 中找到一些您想要的东西,尤其是在像这篇 IBM 文章中一样使用 Selenium Server 时