Skip to content

Commit

Permalink
fix get_or_create_page by ensuring the page is returned
Browse files Browse the repository at this point in the history
  • Loading branch information
wintonzheng committed Feb 24, 2025
1 parent 2a2c6f1 commit 0a0aa53
Showing 1 changed file with 2 additions and 3 deletions.
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

0 comments on commit 0a0aa53

Please # to comment.