自动 Firefox 单击出现的按钮

发布于 2024-12-13 06:21:34 字数 428 浏览 0 评论 0原文

如何让 Firefox 或任何其他浏览器刷新站点,直到在站点上找到某个按钮或 javascript,然后运行 ​​javascript 或使用鼠标单击该按钮?

相关页面将在未知时间通过链接或 JavaScript 按钮进行更新。我想自动刷新它,直到出现此链接,然后单击它。当单击按钮或运行 JavaScript 时,我想停止刷新页面。

我怎样才能自动化这种行为?即使开始这个过程然后坐下来放松就很好,但我一遍又一遍地开始这个过程(刷新)直到单击对象的解决方案也很好。

另外,即使我不知道 javascript 代码出现时是什么或者页面按钮将出现在哪里,也可以这样做吗?如果我知道什么以及在哪里怎么办?是否可以?

我的目标只是尽可能快地单击此按钮或执行 JavaScript!

我一直在尝试我能想到的一切,但我似乎无法让它发挥作用。我将非常感谢我能得到的任何帮助!

How can I make Firefox, or any other browser for that matter, refresh a site until it finds a certain button or javascript on the site, and then either run the javascript or use the mouse to click the button?

The page in question will be updated with a link or javascript button at an unknown time. I want to refresh it automatically until this link appears, and then click it. When the button is clicked or javascript is ran, I want to stop refreshing the page.

How can I automate this behavior? Even if it would be great to just start this process and then sit back and relax, a solution where I start the process (refresh) over and over again until the object is clicked, would also be good.

Also, could this be done even if I don't know what the javascript code would be when it appears or where on the page button will appear? And what if I know what and where? Is it possible?

My objective is just to click this button or excecute the javascript as fast as possible!

I've been trying everything I could think of, but I can't seem to get this to work. I would very much appreciate any help I could get!

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

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

发布评论

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

评论(1

最后的乘客 2024-12-20 06:21:34

这可能不是实现您目标的最佳方式,但如果您不熟悉它,请看一下 Selenium:http: //seleniumhq.org/

This may not be the best way to accomplish your goal, but if you aren't familiar with it, take a look at Selenium: http://seleniumhq.org/

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