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

support shadow dom #555

Merged
merged 1 commit into from
Jul 4, 2024
Merged

support shadow dom #555

merged 1 commit into from
Jul 4, 2024

Conversation

LawyZheng
Copy link
Collaborator

@LawyZheng LawyZheng commented Jul 4, 2024

🚀 This description was created by Ellipsis for commit 83e29b2

Summary:

Added support for handling Shadow DOM elements in the scraping process, including updates to select2 dropdown interactions.

Key points:

  • Updated isInteractable in skyvern/webeye/scraper/domUtils.js to return false for elements with shadowRoot.
  • Modified getSelect2OptionElements and getSelect2Options in skyvern/webeye/scraper/domUtils.js to accept an element parameter and use its root node.
  • Added getDOMElementBySkyvenElement in skyvern/webeye/scraper/domUtils.js to locate elements within shadow roots.
  • Updated buildTreeFromBody in skyvern/webeye/scraper/domUtils.js to handle shadow DOM elements and their children.
  • Modified get_select2_options in skyvern/webeye/scraper/scraper.py to accept an element parameter.
  • Updated Select2Dropdown.get_options in skyvern/webeye/utils/dom.py to pass the element to get_select2_options.
  • Ensured all relevant functions handle shadow DOM elements appropriately.

Generated with ❤️ by ellipsis.dev

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.

❌ Changes requested. Reviewed everything up to 83e29b2 in 44 seconds

More details
  • Looked at 256 lines of code in 3 files
  • Skipped 0 files when reviewing.
  • Skipped posting 0 drafted comments based on config settings.

Workflow ID: wflow_5obRTazHgdXoSgUk


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

skyvern/webeye/scraper/domUtils.js Show resolved Hide resolved
@LawyZheng LawyZheng merged commit 690c1a1 into main Jul 4, 2024
2 checks passed
@LawyZheng LawyZheng deleted the support-shadow-dom branch July 4, 2024 18:54
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