browser_pick
Browser Pick
Select an option from a dropdown or select element. Works with native HTML select elements and dynamic/custom dropdowns (like select2, react-select). Specify the option by its value or visible text. Automatically handles opening the dropdown and selecting the option.
Usage Example
12345678910111213
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.pick(
context_id=context_id,
selector="#element-id",
value="value"
)
Parameters
Required
context_idstringrequiredThe unique identifier of the browser context (e.g., 'ctx_000001')
selectorstringrequiredTarget dropdown/select element. Accepts CSS selector (e.g., '#country', 'select[name="size"]') or natural language description (e.g., 'country dropdown', 'size selector')
valuestringrequiredThe option to select. Can be the option's value attribute OR the visible display text. Works with both native select elements and dynamic dropdowns (select2, etc.)
Response
Returns a JSON object with the operation result.
{
"success": true,
"result": <value>
}