-
Notifications
You must be signed in to change notification settings - Fork 24
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
fix(web-extract): fix the extractor may fail if there is no <body/> #76
Conversation
yuyutaotao
commented
Aug 27, 2024
•
edited
Loading
edited
- fix the extractor may fail if there is no
- log the dump file when locator fails
- collect div with aria attributes
✅ Deploy Preview for midscene ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -212,6 +213,31 @@ export function extractTextWithPosition( | |||
return; | |||
} | |||
|
|||
if (isWidgetElement(node)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
为什么这里是判断有没有 aria 属性就是 form 元素了
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是不是直接判断可见性,如果这个节点不是 input、img、text,并且是可见的有宽高的,我们就把他加到里面去,类型是 container,是不是可以减少类似的问题
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
不过这里需要避免子节点再次被添加直接 return 返回空就行了,这样子节点不会再次被遍历,到这里就终止了