INNER CODE UNIT · Python
browser_select_option
feder-cr/Jobs_Applier_AI_Agent_AIHawk · src/aihawk/mcp/server.py:587
async def browser_select_option(selector: str, value: str,
browser: Browser = None) -> str:
"""Choose an option in a dropdown (`<select>`), by its visible label or by
its value.
Use this rather than clicking the dropdown and pressing arrow keys: a click
plus arrows cannot tell you which row it landed on, and setting the value
through browser_evaluate changes it without the page seeing a real
interaction."""
return await work.acting(actions.select_option, selector, value, role=browser)
@mcp.tool(annotations=_says("Press a key", destructive=True))
async def browser_press_key(key: str, browser: Browser = None) -> str:
"""Press a key on whatever has focus: "Enter", "Tab", "Escape",
"ArrowDown", "Control+a", or a single character."""
return await work.acting(actions.press_key, key, role=browser)