browser_delete_cookies
Browser Delete Cookies
Delete cookies from the browser context. Can delete all cookies, cookies for a specific URL, or a specific cookie by name. Useful for testing login flows or clearing session state.
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.delete_cookies(
context_id=context_id
)
Parameters
Required
context_idstringrequiredThe unique identifier of the browser context (e.g., 'ctx_000001')
Optional
urlstringDelete only cookies applicable to this URL. If empty with empty cookie_name, deletes ALL cookies in context
cookie_namestringDelete only the cookie with this specific name. Can be combined with url parameter. If empty, deletes all cookies (or all for URL if url is provided)
Response
Returns a JSON object with the operation result.
{
"success": true,
"result": <value>
}