Replace the contents of an editable text field with value.
Syntax
text(value, /, focus_index=0)Parameters
| Name | Description |
|---|---|
valueString | Text to input Required · Positional only No default |
focus_indexInt | 0: use the focused editable field, or the first editable field if none is focused. N >= 1: focus and use the N-th editable field. Optional · Positional or named Default: 0 |
Returns
None — None. If no editable field is found, no text is entered.Example
click(Point(300, 500)) # Click input field
wait(200)
text("Hello World", 1)