Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix get_or_create_page by ensuring the page is returned #1830

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

wintonzheng
Copy link
Contributor

@wintonzheng wintonzheng commented Feb 25, 2025

Important

Fixes get_or_create_page in browser_factory.py to ensure a Page is returned by assigning and returning the result of __assert_page().

  • Behavior:
    • Fixes get_or_create_page in browser_factory.py to ensure a Page is returned by assigning page = await self.__assert_page() and returning page.
    • Handles cases where the browser context is invalid by closing the current page and re-creating the state.
  • Functions:
    • Modifies get_or_create_page to store the result of __assert_page() in a variable page and return it.

This description was created by Ellipsis for 0a0aa53. 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 0a0aa53 in 45 seconds

More details
  • Looked at 23 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 7 drafted comments based on config settings.
1. skyvern/webeye/browser_factory.py:536
  • Draft comment:
    Store the result of __assert_page() in 'page' to ensure the page object is captured for later use.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
2. skyvern/webeye/browser_factory.py:547
  • Draft comment:
    Ensure to capture the returned page from __assert_page() after closing the current page.
  • Reason this comment was not posted:
    Comment looked like it was already resolved.
3. skyvern/webeye/browser_factory.py:536
  • Draft comment:
    Assigning the result of __assert_page() to 'page' ensures the created page is returned correctly.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    This comment is purely informative and does not provide any actionable feedback or suggestions for improvement. It simply states what the code is doing without offering any critique or advice.
4. skyvern/webeye/browser_factory.py:547
  • Draft comment:
    Capturing the page from __assert_page() here provides a consistent return value in get_or_create_page.
  • Reason this comment was not posted:
    Comment did not seem useful. Confidence is useful = 0% <= threshold 50%
    This comment is purely informative and does not provide any actionable feedback or suggestions for improvement. It simply states what the code is doing without offering any critique or question about the implementation.
5. skyvern/webeye/browser_factory.py:493
  • Draft comment:
    Typographical error: 'target_lenght' is misspelled. Please update to 'target_length'.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
6. skyvern/webeye/browser_factory.py:599
  • Draft comment:
    Typographical error: 'excuted' should be corrected to 'executed'.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.
7. skyvern/webeye/browser_factory.py:615
  • Draft comment:
    Typographical error: 'broswer' is misspelled. Please update it to 'browser'.
  • Reason this comment was not posted:
    Comment was not on a location in the diff, so it can't be submitted as a review comment.

Workflow ID: wflow_gwjPQzVX4HQ5UTzN


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

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant