问题标签 [chickenfoot]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
267 浏览

javascript - 鸡足 JS 问题

我试图让 Firefox 自动访问一组网页,并以某种方式向我报告加载每个页面需要多少时间。到目前为止,我最好的选择似乎是 ChickenFoot 扩展。但是,以下程序始终输出相同的加载时间(3 毫秒):

有没有人有任何想法?谢谢 !

0 投票
1 回答
472 浏览

firefox - 为什么这个 XPath 语句对于 Firefox 是错误的?

..或者

结果:

Firefox 3.6,由 Chickenfoot 的 XPath 生成器在 GMail 的“旧”按钮处生成的 XPath。

这种 XPath 是什么?为什么会损坏?

0 投票
3 回答
469 浏览

chickenfoot - 使用 Chickenfoot 保存 PDF 文件

我正在使用Chickenfoot 编写一个网络爬虫,需要保存PDF 文件。我可以单击页面上的链接或获取 PDF 的 URL 并使用

我得到了Firefox“打开file.pdf”对话框,但无法单击“确定”按钮实际保存文件。

我尝试使用其他方式下载文件(wget、python 的 urllib2、斜纹),但 PDF 文件是封闭的,所以这些都不起作用。

任何帮助表示赞赏。

0 投票
2 回答
3320 浏览

greasemonkey - Automation tool for Firefox that can manipulate User-Agent or Referrer?

I need to automate some processes in Firefox via Chickenfoot, Greasemonkey, iMacros or any other automation tool. Is any of them allows to change the browser's User-Agent or Referer/Referrer fields?

Thanks a lot!

EDIT: I see people mention to use one of the many Firefox plugins to control Referrer. But the problem is that most of the addons allow to set the referrer manually in the beginning of the session. I need the referrer to be changing many time during the automation process.

0 投票
3 回答
24243 浏览

javascript - 自动单击 javascript 按钮

所以我有一个带有如下代码的按钮:

我需要用javascript点击它。现在我正在使用 firefox 扩展 Chickenfoot,它允许我使用带有一些自定义命令的 javascript 解释器编写网站脚本。

http://groups.csail.mit.edu/uid/chickenfoot/api.html

我尝试使用找到它的 xPath (//div/a[@title='Continue']/..) 选择它,但是当我 click() 时没有任何反应。以下是我尝试过的一些事情:

我知道这是一个相当具体的问题,但任何关于尝试什么的想法都将不胜感激。

0 投票
1 回答
954 浏览

javascript - 如何使用Chickenfoot Firefox 扩展将网页中的图像保存到本地磁盘

如何使用Chickenfoot Firefox 扩展将网页中的图像保存到本地磁盘?

writeBytes(文件名:字符串或nsIFile,数据:字符串)

该功能由Chickenfoot 提供,用于将数据写入给定文件,完全替换磁盘上文件的内容。文件中只保存数据字符串中每个字符的低字节,所以只能使用该命令保存 8 位二进制数据,如图像或二进制文件。对于文本 Unicode 数据,请改用 write()。

但问题是我不知道如何使用 javascript 从网页中获取图像。

提前致谢。