自动生成
此文档由 make doc-gen 命令从 Python 源码注释自动生成。
BrowserSandbox
浏览器沙箱高层API模板 / Browser Sandbox High-Level API Template
此模板用于生成浏览器沙箱资源的高级API代码。 This template is used to generate high-level API code for browser sandbox resources.
类
BrowserSandbox
class BrowserSandbox(Sandbox)
属性
📌 data_api
方法
🔹 check_health_async
async def check_health_async(self)
🔹 check_health
def check_health(self)
🔹 get_cdp_url
def get_cdp_url(self, record: Optional[bool] = False)
🔹 get_vnc_url
def get_vnc_url(self, record: Optional[bool] = False)
🔹 sync_playwright
def sync_playwright(self, record: Optional[bool] = False)
🔹 async_playwright
def async_playwright(self, record: Optional[bool] = False)
🔹 list_recordings_async
async def list_recordings_async(self)
🔹 list_recordings
def list_recordings(self)
🔹 download_recording_async
async def download_recording_async(self, filename: str, save_path: str)
Asynchronously download a recording video file and save it to local path.
Args:
filename: The name of the recording file to downloadsave_path: Local file path to save the downloaded video file (.mkv)
Returns:
Dictionary with 'saved_path' and 'size' keys
🔹 download_recording
def download_recording(self, filename: str, save_path: str)
Synchronously download a recording video file and save it to local path.
Args:
filename: The name of the recording file to downloadsave_path: Local file path to save the downloaded video file (.mkv)
Returns:
Dictionary with 'saved_path' and 'size' keys
🔹 delete_recording_async
async def delete_recording_async(self, filename: str)
🔹 delete_recording
def delete_recording(self, filename: str)