java_set_text
Set text in Java text fields, text areas, or editable combo boxes, replacing existing content and confirming the new value before returning.
Instructions
Type into a text field, text area or editable combo box.
This sets the text rather than appending to it, and it waits for the field to report
the new value before returning, so a following read sees what was typed. By default it
goes through the accessibility action; simulate=True types real keystrokes instead,
which is the fallback when the action is refused.
Use java_fill_form instead when several fields need values: it is one round trip and it reports each field separately.
The element is verified before anything is typed, exactly as java_click describes.
Args: session_id: From java_attach_window. handle: The field to type into. value: The text to set. simulate: Type real keystrokes instead of using the accessibility action.
Returns: What was set, and a reminder to re-read the field to confirm.
Errors:
is_error for an unknown handle, an element that changed, or a field that
refused the text — the message says to try simulate=True when that is the
likely answer.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"session_id": "<session_id>",
"handle": "<handle>",
"value": "<value>"
},
"name": "java_set_text"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| value | Yes | ||
| handle | Yes | ||
| simulate | No | ||
| session_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |