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

fix dom parsing issue #1365

Merged
merged 1 commit into from
Dec 10, 2024
Merged

fix dom parsing issue #1365

merged 1 commit into from
Dec 10, 2024

Conversation

LawyZheng
Copy link
Collaborator

@LawyZheng LawyZheng commented Dec 10, 2024

Important

Fix DOM parsing issue by adding iterable checks for element.attributes in hasNgAttribute() and buildElementObject() in domUtils.js.

  • Behavior:
    • Add check for iterable element.attributes in hasNgAttribute() and buildElementObject() in domUtils.js.
    • Log a warning if element.attributes is not iterable in buildElementObject().
  • Functions:
    • hasNgAttribute(): Returns false if element.attributes is not iterable.
    • buildElementObject(): Skips attribute processing and logs a warning if element.attributes is not iterable.

This description was created by Ellipsis for 3434a52. It will automatically update as commits are pushed.

Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to 3434a52 in 15 seconds

More details
  • Looked at 68 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern/webeye/scraper/domUtils.js:1089
  • Draft comment:
    Consider providing more context in the warning message to help with debugging.
console.warn(`element.attributes is not iterable for element with tagName=${element.tagName} and element_id=${element_id}`);
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The PR adds a check for iterable attributes in hasNgAttribute and buildElementObject functions. This is a good practice to prevent errors when element.attributes is not iterable. However, the warning message in buildElementObject could be improved for clarity.

Workflow ID: wflow_ETXHnW5py4TyhBhh


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@LawyZheng LawyZheng merged commit 5830758 into main Dec 10, 2024
2 checks passed
@LawyZheng LawyZheng deleted the lawy/fix-dom-parsing-issue branch December 10, 2024 16:05
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

Successfully merging this pull request may close these issues.

1 participant