INNER CODE UNIT · Python

browser_type

feder-cr/Jobs_Applier_AI_Agent_AIHawk · src/aihawk/mcp/server.py:577

async def browser_type(selector: str, text: str, browser: Browser = None) -> str:
    """Fill a field, replacing whatever it holds.

    This sets the value rather than typing key by key, so it will not fire the
    per-keystroke handlers an autocomplete needs. For those, click the field and
    use browser_press_key."""
    return await work.acting(actions.type_text, selector, text, role=browser)


@mcp.tool(annotations=_says("Choose a dropdown option", destructive=True))
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

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…