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
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions skyvern/webeye/browser_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ async def get_or_create_page(
workflow_run_id=workflow_run_id,
organization_id=organization_id,
)
await self.__assert_page()
page = await self.__assert_page()

if not await BrowserContextFactory.validate_browser_context(await self.get_working_page()):
await self.close_current_open_page()
Expand All @@ -547,8 +547,7 @@ async def get_or_create_page(
workflow_run_id=workflow_run_id,
organization_id=organization_id,
)
await self.__assert_page()

page = await self.__assert_page()
return page

async def close_current_open_page(self) -> None:
Expand Down