Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

设计任务时测试循环内js判断成功,但是在执行任务时提示JavaScript execution failed #535

Open
CyfZsj opened this issue Aug 30, 2024 · 2 comments

Comments

@CyfZsj
Copy link

CyfZsj commented Aug 30, 2024

操作步骤:本地直接执行(纯净模式)
报错log:
2024-08-30 15:14:36.497603: 执行节点|Execute node: 判断1层结点是否需要展开
2024-08-30 15:14:36.497655: Execute JavaScript for element:return arguments[0].innerText.includes("营销")
2024-08-30 15:14:36.497662: 对元素执行JavaScript:return arguments[0].innerText.includes("营销")
2024-08-30 15:14:36.500151: JavaScript execution failed
2024-08-30 15:14:36.500184: 判断条件内所有条件分支的条件都不满足|None of the conditions in the
设计流程时,提示条件满足:
image
环境: macos 13.1
Google Chrome版本:128.0.6613.114(正式版本) (arm64)

@NaiboWang
Copy link
Owner

看流程看不出太大问题,也许是判断的时候页面元素没有加载完成导致检测不到,或者XPath发生了变化?

实在操作不了,建议直接下载代码调试。

@CyfZsj
Copy link
Author

CyfZsj commented Sep 6, 2024

好吧 我调了好久没调好,决定不用js判断了,每个节点都循环尝试循环展开子节点,超时就跳过,好像也可以实现。
但是我这个任务放到linux服务器上执行 就不行了,会报错:执行节点<二级目录循环>时出错,将继续执行,错误为: list index out of range然后那一层的节点没有完整爬取到,会跳出循环到上层循环里继续执行

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants