Skyvern-AI / skyvern

Automate browser-based workflows with LLMs and Computer Vision
https://www.skyvern.com
GNU Affero General Public License v3.0
10.73k stars 739 forks source link

refactor chain click #1186

Closed LawyZheng closed 1 week ago

LawyZheng commented 1 week ago

[!IMPORTANT] Refactor chain_click in handler.py to enhance error handling and element interaction, adding new methods to SkyvernElement and SkyvernFrame for improved robustness.

  • Behavior:
    • Refactor chain_click in handler.py to improve error handling and element interaction.
    • Add error message parameter to FailToClick exception in exceptions.py.
    • Handle label elements, non-visible elements, and blocking elements in chain_click.
  • Element Handling:
    • Add is_visibile(), is_parent_of(), is_child_of(), and is_sibling_of() methods to SkyvernElement in dom.py.
    • Add get_blocking_element_id() and is_sibling() methods to SkyvernFrame in page.py.
  • JavaScript Enhancements:
    • Add isParent(), isSibling(), and getBlockElementUniqueID() functions in domUtils.js to support new element checks.

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