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

skip invisible iframe #870

Merged
merged 1 commit into from
Sep 21, 2024
Merged

skip invisible iframe #870

merged 1 commit into from
Sep 21, 2024

Conversation

LawyZheng
Copy link
Collaborator

@LawyZheng LawyZheng commented Sep 21, 2024

Important

Skip invisible iframes in get_frame_text() and get_interactable_element_tree_in_frame() to prevent scraping issues.

  • Behavior:
    • Skip invisible iframes in get_frame_text() and get_interactable_element_tree_in_frame() to prevent getting stuck during frame.evaluate().
  • Logging:
    • Add warning log in get_frame_text() when unable to get child_frame_element.

This description was created by Ellipsis for 33cfe1b. 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 33cfe1b in 12 seconds

More details
  • Looked at 35 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. skyvern/webeye/scraper/scraper.py:262
  • Draft comment:
    Consider adding exception handling around await child_frame_element.is_visible() to handle potential errors or timeouts.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The code checks for visibility of iframe elements before evaluating them, which is a good practice to avoid errors. However, the visibility check is done using await child_frame_element.is_visible(), which is an asynchronous call. If this call fails or takes too long, it might cause issues. It's better to handle potential exceptions around this call.
2. skyvern/webeye/scraper/scraper.py:358
  • Draft comment:
    Consider adding exception handling around await frame_element.is_visible() to handle potential errors or timeouts. This applies here and in the get_frame_text function.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The same visibility check issue exists in another part of the code. It's important to handle exceptions around asynchronous calls to ensure robustness.

Workflow ID: wflow_85MCHxNz45DLqX4F


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

@LawyZheng LawyZheng merged commit aedaeb4 into main Sep 21, 2024
2 checks passed
@LawyZheng LawyZheng deleted the lawy/skip-invisible-iframe branch September 21, 2024 01:30
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