add step prepare and browser clean up (#554)

This commit is contained in:
LawyZheng
2024-07-05 02:17:34 +08:00
committed by GitHub
parent 7cdd986bde
commit be97d0bdb1
4 changed files with 40 additions and 7 deletions

View File

@@ -30,6 +30,7 @@ class BrowserManager:
(
browser_context,
browser_artifacts,
browser_cleanup,
) = await BrowserContextFactory.create_browser_context(
pw,
proxy_location=proxy_location,
@@ -41,6 +42,7 @@ class BrowserManager:
browser_context=browser_context,
page=None,
browser_artifacts=browser_artifacts,
browser_cleanup=browser_cleanup,
)
async def get_or_create_for_task(self, task: Task) -> BrowserState: