Update custom_browser.py

This commit is contained in:
Richardson Gunde
2025-01-08 19:52:02 +05:30
committed by GitHub
parent 779c4116a7
commit 15c332d7d5

View File

@@ -4,16 +4,17 @@
# @ProjectName: browser-use-webui
# @FileName: browser.py
from browser_use.browser.browser import Browser, BrowserConfig
from browser_use.browser.context import BrowserContextConfig, BrowserContext
from browser_use.browser.browser import Browser
from browser_use.browser.context import BrowserContext, BrowserContextConfig
from .custom_context import CustomBrowserContext
class CustomBrowser(Browser):
async def new_context(
self, config: BrowserContextConfig = BrowserContextConfig(), context: CustomBrowserContext = None
self,
config: BrowserContextConfig = BrowserContextConfig(),
context: CustomBrowserContext = None,
) -> BrowserContext:
"""Create a browser context"""
return CustomBrowserContext(config=config, browser=self, context=context)