browser_close_all_contexts
Browser Close All Contexts
Close ALL browser contexts at once and reclaim the entire context pool. Emergency recovery for when the context limit is reached but contexts are orphaned or unresponsive. Returns the number of contexts closed. Use with care: this terminates every active session.
Usage Example
1234567891011
import asyncio
from owl_browser import OwlBrowser, RemoteConfig
# Async usage
async with OwlBrowser(config) as browser:
context = await browser.create_context()
context_id = context["context_id"]
await browser.close_all_contexts(
)
Response
Returns a JSON object with the operation result.
{
"success": true,
"result": <value>
}