有没有开源浏览器 GUI 自动化工具支持单击页面上任意位置的特定图标?

发布于 2024-09-30 16:51:20 字数 291 浏览 3 评论 0原文

在 Windows 或 Linux 平台上,是否有一个 GUI 自动化工具可以打开浏览器页面(任何浏览器,我不在乎),然后单击特定图标图像的每个实例,无论它位于页面上的任何位置无论它存在多少次。

我好像记得IBM的Rational Robot有这个能力。对于身无分文的人来说,是否有一个开源替代方案(哦,是的……道德上更优越:-))

编辑:

我希望能够单击特定的位图或像素矩形,无论它位于页面上的哪个位置,即使它是较大的图像或出现在 Flash 窗口中。无论图像存在于页面上的何处,也无论容器或图像的名称如何,请单击它。

On either the Windows or Linux platform, is there a GUI automation tool that will open up a browser page (any browser, I don't care) and then click on every instance of a specific icon image, wherever it may be on the page and however many times it exists.

I seem to recall this ability in IBM's Rational Robot. Is there an open source alternative for the penniless ( oh yah... and the morally superior :-) )

EDIT:

I'd like to be able to click a specific bitmap or rectangle of pixels, where ever it is on the page, even if it is in a larger image or if it appears in a flash window. Where ever the image exists on the page, and whatever name the container or image has, click it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(6

灵芸 2024-10-07 16:51:20

请查看 sikuli.org

另请参阅:sikuli 相关问题 on SO

它使用图像-基于屏幕截图识别,并具有集成的脚本编辑器,允许您直接插入与脚本内联的目标按钮图像。

它可以在 Windows 和 Mac OS 上运行,并且可以与任何应用程序(包括浏览器)配合使用。

脚本语言是 Jython。

该库是开源的,具有 MIT 许可证。实际上,它是在麻省理工学院开发的。

Please take a look at sikuli.org.

Also see: sikuli related questions on SO

It uses image-based screenshot recognition and has an integrated script editor that allows you to insert target button images directly inline with the script.

It runs on Windows and Mac OS, and will work with any applications (browsers included).

The scripting language is Jython.

The library is open source with MIT license. Actually, it is developed at MIT.

仙女 2024-10-07 16:51:20

您看过 Watir 吗?它是一个用 Ruby 编写的基于浏览器的 Web 应用程序自动化框架。

Have you taken a look at Watir? It's a browser-based web application automation framework written in Ruby.

绝不服输 2024-10-07 16:51:20

如果您知道图像网址,请使用此硒选择器:

"dom:var elist=document.getElementsByTagName('img');var toret = null;
for (var i=0; i<elist.length; i++) { if (elist[i].src=='something.png') {
toret = elist[i]; } }; toret"

http://seleniumhq.org /docs/04_selenese_commands.html#looking-by-dom

If you know the image url, use this selenium selector:

"dom:var elist=document.getElementsByTagName('img');var toret = null;
for (var i=0; i<elist.length; i++) { if (elist[i].src=='something.png') {
toret = elist[i]; } }; toret"

http://seleniumhq.org/docs/04_selenese_commands.html#locating-by-dom

淡写薰衣草的香 2024-10-07 16:51:20

AutoIt 是另一个很棒的自动化工具。您可以检查 IE 的用户定义函数 (UDF),它是默认包的一部分。

它提供了很多自动化的IE管理、Windows系统级别管理、声音管理等,

您可以从下载免安装包http://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-sfx.exe 和查看 UDFs3.chm 帮助文件中的 IE 管理 UDF 示例。

AutoIt is another great tool for automation. You could check the User Defined Function (UDF) for IE, which comes as a part of default package.

It provides a whole lot automation IE Management, Windows System level management, Sound Management etc.,

You could start by downloading the no-install package http://www.autoitscript.com/cgi-bin/getfile.pl?autoit3/autoit-v3-sfx.exe and look into the examples of IE Management UDF in the UDFs3.chm help file.

蓝天白云 2024-10-07 16:51:20

如果您的图像可以通过 CSS id 在页面上识别,您应该能够使用 cucumber/webrat 和/来完成此操作或 cucumber/selenium (如果您还想在页面中测试 javascript,则使用后者)。不是 GUI 工具,但功能非常强大。

If your image is identifiable on the page by a CSS id, you should be able to accomplish this using cucumber/webrat and/or cucumber/selenium (the latter if you also want to test javascript in the page). Not a GUI tool but very powerful.

-小熊_ 2024-10-07 16:51:20

答案是否定的:没有开源工具可以做到这一点。那是因为这是一个坏主意。像 Rational 这样的商业工具试图做到这一点,因为它们试图为所有人提供一切(即使它们工作得不是很好)。但是通过位图图像进行选择很容易思考,但很难可靠地执行,因此现代流行的工具甚至没有尝试过。相反,他们专注于如何取得成功。

正如其他人已经说过的那样,正确的做法是通过 CSS 选择器或图像文件名来选择图像。这可以通过任何现代 GUI 测试工具可靠地完成:Watir、Selenium、Webrat ...

The answer is NO: there is not an open source tool that does this. That is because this is a bad idea. Commercial tools like Rational tried to do this because they tried to be all things to all people (even if they didn't work very well). But selecting by bitmap image is easy to think about and hard to perform reliably so none of the modern popular tools even try. Instead they focus on how to be SUCCESSFUL.

The right thing to do, as others have already said here is to select images by CSS selector or by image file name. This can be done reliably by any modern GUI test tool: Watir, Selenium, Webrat ...

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文