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 value select for custom selection #756

Merged
merged 1 commit into from
Aug 29, 2024

Conversation

LawyZheng
Copy link
Collaborator

@LawyZheng LawyZheng commented Aug 29, 2024

🚀 This description was created by Ellipsis for commit 25604e0

Summary:

This PR adds support for selecting values in custom dropdowns by introducing a value field in JSON responses and updating relevant functions and classes across the codebase.

Key points:

  • Added value field in JSON response in skyvern/forge/prompts/skyvern/custom-select.j2.
  • Updated handle_select_option_action in skyvern/webeye/actions/handler.py to support value-based selection.
  • Introduced select_from_dropdown_by_value function in skyvern/webeye/actions/handler.py.
  • Modified IncrementalScrapePage class in skyvern/webeye/scraper/scraper.py to support value-based element selection.
  • Enhanced DomUtils in skyvern/webeye/scraper/domUtils.js to recognize dropdown buttons.
  • Updated SkyvernElement class in skyvern/webeye/utils/dom.py to find interactable elements by value.

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.

👍 Looks good to me! Reviewed everything up to 25604e0 in 1 minute and 12 seconds

More details
  • Looked at 690 lines of code in 7 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. skyvern/webeye/actions/handler.py:84
  • Draft comment:
    The function remove_exist_elements is defined twice in this file. Consider removing the duplicate definition to avoid confusion and potential maintenance issues.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment is about a change made in the diff, specifically the removal of the duplicate function definition. Since the duplicate was removed, the issue raised by the comment has been resolved.
    I might be missing the context of whether the removal was intentional or if there are any side effects of removing the duplicate function.
    The removal of the duplicate function seems intentional as it aligns with the comment's suggestion to avoid confusion and maintenance issues.
    The comment is about a change made in the diff, but the issue has already been resolved by the removal of the duplicate function. Therefore, the comment should be deleted.
2. skyvern/webeye/actions/handler.py:1256
  • Draft comment:
    The function name locate_dropdown_meanu is misspelled. Consider renaming it to locate_dropdown_menu for clarity and consistency.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment is about a change made in the diff, specifically the renaming of a function. However, the issue it raises has already been resolved in the diff, as the function name was corrected. Therefore, the comment is no longer necessary.
    I might be overlooking the possibility that the comment serves as a reminder or confirmation of the correction. However, since the change is already made, the comment doesn't add value.
    Even if the comment serves as a confirmation, the change is already visible in the diff, making the comment redundant.
    The comment should be removed because the issue it raises has already been resolved in the diff.

Workflow ID: wflow_8llnCXVIuH4w6hsR


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

@LawyZheng LawyZheng merged commit 9e02016 into main Aug 29, 2024
2 checks passed
@LawyZheng LawyZheng deleted the lawy/support-custom-select-by-value branch August 29, 2024 17:24
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