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

fallback to use js click #1274

Merged
merged 1 commit into from
Nov 27, 2024
Merged

fallback to use js click #1274

merged 1 commit into from
Nov 27, 2024

Conversation

LawyZheng
Copy link
Collaborator

@LawyZheng LawyZheng commented Nov 27, 2024

Important

Add JavaScript click fallback in chain_click() for blocked elements in handler.py, with supporting changes in domUtils.js, dom.py, and page.py.

  • Behavior:
    • In handler.py, chain_click() now attempts a JavaScript click if the element is blocked by a non-interactable element.
    • Logs an error and returns ActionFailure if JavaScript click fails.
  • JavaScript:
    • getBlockElementUniqueID() in domUtils.js now returns a tuple with a boolean indicating if the element is blocked.
  • Functions:
    • find_blocking_element() in dom.py and get_blocking_element_id() in page.py updated to handle new tuple return type.
    • Added click_in_javascript() method to SkyvernElement in dom.py for executing JavaScript clicks.

This description was created by Ellipsis for 52f0c71. 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 52f0c71 in 58 seconds

More details
  • Looked at 115 lines of code in 4 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. skyvern/webeye/utils/dom.py:323
  • Draft comment:
    The return type of find_blocking_element has changed to tuple[SkyvernElement | None, bool], ensure that all usages of this function are updated to handle the new return type.
  • Reason this comment was not posted:
    Comment did not seem useful.
2. skyvern/webeye/actions/handler.py:1264
  • Draft comment:
    The return type of find_blocking_element has changed to tuple[SkyvernElement | None, bool], ensure that all usages of this function are updated to handle the new return type.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_A8IROLfWVo2WDJzT


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

@LawyZheng LawyZheng merged commit 48e4984 into main Nov 27, 2024
2 checks passed
@LawyZheng LawyZheng deleted the lawy/fallback-to-js-click branch November 27, 2024 14:44
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