iMacros for Chrome:如果发生错误如何重播宏?

发布于 2025-01-13 10:22:11 字数 265 浏览 0 评论 0原文

我有这个简单的 3 行宏来加载表单并提交,有时我收到此消息“RuntimeError:未找到 TXT 指定的元素 SPAN:提交未找到,行:3”如何自动重播宏?我想重播宏,直到提交表单。我正在使用 iMacros for Chrome 版本 10.1.1,谢谢。

SET !TIMEOUT_STEP 0
URL GOTO=https://docs.google.com/forms/......
TAG POS=2 TYPE=SPAN ATTR=TXT:Submit

I have this simple 3 line macro to load a form and submit, sometime I get this "RuntimeError: element SPAN specified by TXT:Submit was not found, line: 3" how can I auto replay the macro? I would like to replay the macro until the form is submitted. I am using iMacros for Chrome Version 10.1.1, thank you.

SET !TIMEOUT_STEP 0
URL GOTO=https://docs.google.com/forms/......
TAG POS=2 TYPE=SPAN ATTR=TXT:Submit

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

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

发布评论

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

评论(1

挽你眉间 2025-01-20 10:22:11

是的,好吧...,您的 !TIMEOUT_STEP (=0) 是“问题(部分)”...!

“Google”文档/表单“已知”是相当“重”的页面,需要“一些时间”来加载(特别是如果您是文档/表单的所有者/编辑者),甚至当浏览器“思考”时页面已完全加载(并告诉 iMacros(在 URl GOTO 之后),=>“继续,页面已加载,您可以继续执行脚本的其余部分”...) , 有在“提交”按钮出现或激活之前,页面/字段上可能还有一些后台 JS 验证(必填字段、数据格式等...)...

  • !TIMEOUT_STEP, =>;至少 =1,但 =3 或默认 =6 也可以,并且比您的 =0 更“可靠”...

  • 和/或,添加一个迷你 WAIT 语句在 URL GOTO 之后。

  • 和/或,在脚本开头或至少在 URL GOTO 之后添加一个迷你 !PLAYBACKDELAY 语句。

...其他技术也可用于“提高可靠性”(=> 在激活 !ERRORIGNORE 的情况下循环脚本,并有条件地中止它(使用 EXTRACT + EVAL () + MacroError()) 成功后,有条件地设置我提到的任何“超时”选项,并在单击后提取“结果”在“提交”按钮上等等...),但它们都会与您的 !TIMEOUT_STEP=0 进行“战斗”,因为它太短了...

Yeah, well..., your !TIMEOUT_STEP (=0) is "(part of) the problem"...!

'Google' Docs/Forms are "known" to be pretty "heavy" Pages that take "some time" to load, (especially if you are the Owner/Editor of the Doc/Form), and even when the Browser "thinks" that the Page has fully loaded (and tells iMacros (after the URl GOTO), => "Go on, the Page has loaded, you can proceed with the rest of the Script"...), there is probably still some background JS Validation on the Page/Fields (Required Fields, Data Formatting, etc...), before that 'Submit' Button will appear or get Activated...

  • Use a longer Setting/Value for !TIMEOUT_STEP, => at least =1, but =3 or the Default =6 would also be OK and much more "reliable" than your =0...

  • And/or, add a mini-WAIT Statement after the URL GOTO.

  • And/or, add a mini-!PLAYBACKDELAY Statement at the beginning of the Sccript, or at least after the URL GOTO.

... Other Techniques are also available to "increase Reliability" (=> loop the Script with !ERRORIGNORE activated and conditionally abort it (with EXTRACT + EVAL() + MacroError()) when successful, set any of the 'Timeout' Options I mention conditionally, combined with extracting the "Result" after clicking on the 'Submit' Button, etc...), but they will all be "fighting" against your !TIMEOUT_STEP=0 which is too short...

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